Fix for uuid_unpack incorrect shift precedence.

This commit is contained in:
Marcelo Roberto Jimenez 2011-03-10 16:21:25 -03:00
parent 0d3412bb24
commit e30e7bd586
3 changed files with 4 additions and 1 deletions

View File

@ -2,6 +2,8 @@
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

1
THANKS
View File

@ -31,6 +31,7 @@ exempt of errors.
- Fredrik Svensson
- Glen Masgai
- Hartmut Holzgraefe (hholzgra)
- Iain Denniston (ectotropic)
- Ingo Hofmann
- Ivan Romanov (ivanromanov)
- 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 |= (1 << 12);
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;
memcpy(&uid->node, &node, sizeof uid->node);
};