summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2012-10-30 16:07:09 -0700
committerKaz Kylheku <kaz@kylheku.com>2012-10-30 16:07:09 -0700
commit028668d2f2604850122fa6ee22bcbc6720910caa (patch)
tree8144217bcac5f24176205f782634811650051b49
parenta7501cdc8b3d5913dd449dc665ae684d6af4caa4 (diff)
downloadtxr-028668d2f2604850122fa6ee22bcbc6720910caa.tar.gz
txr-028668d2f2604850122fa6ee22bcbc6720910caa.tar.bz2
txr-028668d2f2604850122fa6ee22bcbc6720910caa.zip
* lib.c (string_lt): Bugfix: wcscmp returns some value less than zero,
not specifically -1.
-rw-r--r--ChangeLog5
-rw-r--r--lib.c3
2 files changed, 6 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index e4cf4b98..e9098b07 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
2012-10-30 Kaz Kylheku <kaz@kylheku.com>
+ * lib.c (string_lt): Bugfix: wcscmp returns some value less than zero,
+ not specifically -1.
+
+2012-10-30 Kaz Kylheku <kaz@kylheku.com>
+
* mpi-patches/config-types: Include the header as "config.h"
rather than "../config.h" because the dependency generation script
checks for this as a special case and treats it relative to the
diff --git a/lib.c b/lib.c
index 89a38496..2c3ddff4 100644
--- a/lib.c
+++ b/lib.c
@@ -2092,8 +2092,7 @@ val trim_str(val str)
val string_lt(val astr, val bstr)
{
- int cmp = wcscmp(c_str(astr), c_str(bstr));
- return cmp == -1 ? t : nil;
+ return wcscmp(c_str(astr), c_str(bstr)) < 0 ? t : nil;
}
val int_str(val str, val base)