Fix for uuid_unpack incorrect shift precedence.

This commit is contained in:
Marcelo Roberto Jimenez 2011-03-10 16:21:25 -03:00
parent 5a8aec58aa
commit 1df5609d52
3 changed files with 9 additions and 1 deletions

View File

@ -251,6 +251,13 @@ Version 1.8.0
* Rewrote Peter Hartley's patch to include a new extra header field in * Rewrote Peter Hartley's patch to include a new extra header field in
FileInfo. FileInfo.
*******************************************************************************
Version 1.6.13
*******************************************************************************
2011-03-08 Iain Denniston <iain.denniston(at)gmail.com>
Fix for uuid_unpack incorrect shift precedence.
******************************************************************************* *******************************************************************************
Version 1.6.12 Version 1.6.12
******************************************************************************* *******************************************************************************

1
THANKS
View File

@ -31,6 +31,7 @@ exempt of errors.
- Fredrik Svensson - Fredrik Svensson
- Glen Masgai - Glen Masgai
- Hartmut Holzgraefe (hholzgra) - Hartmut Holzgraefe (hholzgra)
- Iain Denniston (ectotropic)
- Ingo Hofmann - Ingo Hofmann
- Ivan Romanov (ivanromanov) - Ivan Romanov (ivanromanov)
- Jiri Zouhar - Jiri Zouhar

View File

@ -109,7 +109,7 @@ void format_uuid_v1(uuid_upnp * uid,
uid->time_hi_and_version = (uint16_t)((timestamp >> 48) & 0x0FFF); uid->time_hi_and_version = (uint16_t)((timestamp >> 48) & 0x0FFF);
uid->time_hi_and_version |= (1 << 12); uid->time_hi_and_version |= (1 << 12);
uid->clock_seq_low = (uint8_t) (clock_seq & 0xFF); uid->clock_seq_low = (uint8_t) (clock_seq & 0xFF);
uid->clock_seq_hi_and_reserved = (uint8_t) (clock_seq & 0x3F00) >> 8; uid->clock_seq_hi_and_reserved = (uint8_t) ((clock_seq & 0x3F00) >> 8);
uid->clock_seq_hi_and_reserved |= 0x80; uid->clock_seq_hi_and_reserved |= 0x80;
memcpy(&uid->node, &node, sizeof uid->node); memcpy(&uid->node, &node, sizeof uid->node);
}; };