From 14b6605701e0ee428f76ceafa8e5ee54b47ce425 Mon Sep 17 00:00:00 2001 From: Michaelangel007 Date: Wed, 24 Aug 2016 10:21:16 -0700 Subject: [PATCH] Fix random() stdlib conflict in a2fcbmp.c --- src_a2b/a2fcbmp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src_a2b/a2fcbmp.c b/src_a2b/a2fcbmp.c index 7fa5d1c..a84b091 100755 --- a/src_a2b/a2fcbmp.c +++ b/src_a2b/a2fcbmp.c @@ -1222,7 +1222,7 @@ unsigned char dlomaincolor[16] = { /* -------------------------------------------------------------- */ /* http://stackoverflow.com/questions/7602919/how-do-i-generate-random-numbers-without-rand-function */ ushort RandomSeed = (ushort)0xACE1; -ushort random() +ushort my_random() { ushort bit = ((RandomSeed >> 0) ^ (RandomSeed >> 2) ^ (RandomSeed >> 3) ^ (RandomSeed >> 5) ) & 1; @@ -1243,7 +1243,7 @@ int RandomRange(int iMaxValue) do { /* get random number */ - iRetVal = (int)random(); + iRetVal = (int)my_random(); /* get a positive value */ if (iRetVal < 0) iRetVal *= -1;