Changeset 341 for trunk/thune/math.c

Show
Ignore:
Timestamp:
01/07/07 16:56:56 (2 years ago)
Author:
krobillard
Message:

Fixed 'at (thanks to Krzysztof Kowalczyk)
Thune - Added 'appen helper. [0 random] no longer crashes.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/thune/math.c

    r336 r341  
    541541    else if( ur_is(tos, UT_INT) ) 
    542542    { 
    543         ur_int(tos) = (genrand_int32() % ur_int(tos)) + 1; 
     543        if( ur_int(tos) > 0 ) 
     544            ur_int(tos) = (genrand_int32() % ur_int(tos)) + 1; 
    544545    } 
    545546    else if( ur_isASeries( tos ) )