fix"string compare works differently in simulator/on target"

This commit is contained in:
Sam El-Husseini 2017-01-12 16:14:15 -08:00
parent 9d58ea8b1c
commit 8c2ecdd42e

View File

@ -21,7 +21,12 @@ namespace String_ {
//%
int compare(StringData *s, StringData *that) {
return strcmp(s->data, that->data);
int compareResult = strcmp(s->data, that->data);
if (compareResult < 0)
return -1;
else if (compareResult > 0)
return 1;
return 0;
}
//%