Ignore:
Timestamp:
12/24/09 22:05:24 (3 years ago)
Author:
reyalp
Message:
  • add strtoul on all cameras. Only tested on a540 but perfect matches on all.
  • fix lua handling of hex constants that would set sign bit. Now (as in standard lua) treated as an unsigned value, rather than resulting in LONG_MAX. Note that arithmetic and comparisons on such values in lua will still treat them as signed!
  • use strtoul in luaB_tonumber(), as in stock lua.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/lua/lbaselib.c

    r654 r865  
    9797    unsigned long n; 
    9898    luaL_argcheck(L, 2 <= base && base <= 36, 2, "base out of range"); 
    99     n = strtol(s1, &s2, base); 
     99    n = strtoul(s1, &s2, base); 
    100100    if (s1 != s2) {  /* at least one valid digit? */ 
    101101      while (isspace((unsigned char)(*s2))) s2++;  /* skip trailing spaces */ 
Note: See TracChangeset for help on using the changeset viewer.