mirror of
https://github.com/ptitSeb/Serious-Engine
synced 2024-11-22 10:20:26 +01:00
Fixed a sizeof bug.
If you have... void myfunc(char buf[16]) { printf("%d\n", (int) sizeof (buf)); } ...this will print sizeof (char *) instead of 16, so this fixes a piece of code that assumed the latter instead of the former.
This commit is contained in:
parent
1f1291d2bc
commit
284f6c63ca
|
@ -64,7 +64,7 @@ static void GetGUID(UBYTE aub[16])
|
||||||
#else
|
#else
|
||||||
|
|
||||||
// !!! FIXME : rcg10112001 Is this sufficient for these purposes?
|
// !!! FIXME : rcg10112001 Is this sufficient for these purposes?
|
||||||
for (int i = 0; i < sizeof (aub) / sizeof (aub[0]); i++)
|
for (int i = 0; i < 16; i++)
|
||||||
aub[i] = (UBYTE) (255.0 * rand() / (RAND_MAX + 1.0));
|
aub[i] = (UBYTE) (255.0 * rand() / (RAND_MAX + 1.0));
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue
Block a user