The cmp() function doesn't work. It always returns -1, which isn't surprising, as it doesn't compare the strings, but the (non-changing) string addresses.
m. Index: lib.c =================================================================== RCS file: /var/cvs/SimGear-0.3/SimGear/simgear/nasal/lib.c,v retrieving revision 1.12 diff -u -p -r1.12 lib.c --- lib.c 10 Jan 2006 20:25:46 -0000 1.12 +++ lib.c 21 Mar 2006 18:35:25 -0000 @@ -116,7 +116,7 @@ static naRef f_cmp(naContext c, naRef me if(naStr_len(args[1]) < len) len = naStr_len(args[1]); for(i=0; i<len; i++) { - int diff = a - b; + int diff = *a++ - *b++; if(diff < 0) return naNum(-1); else if(diff > 0) return naNum(1); } ------------------------------------------------------- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 _______________________________________________ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel