I wouldn't be surprised if this was the problem:
| PMOD_EXPORT unsigned INT32 my_rand(void)
| {
| if( ++rnd_index == RNDBUF) rnd_index=0;
| return rndbuf[rnd_index] +=
rndbuf[rnd_index+RNDJUMP-(rnd_index<RNDBUF-RNDJUMP?0:RNDBUF)];
| }
...
| PMOD_EXPORT
| PIKEFUN int random(int i)
| {
| if(i <= 0) RETURN 0;
| RETURN my_rand() % i;
| } Note the INT32.
