fix"string compare works differently in simulator/on target" (#340)
* fix for "string compare works differently in simulator/on target", fixes #901
This commit is contained in:
parent
eee52a5c04
commit
86f6b58d38
@ -21,7 +21,12 @@ namespace String_ {
|
|||||||
|
|
||||||
//%
|
//%
|
||||||
int compare(StringData *s, StringData *that) {
|
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;
|
||||||
}
|
}
|
||||||
|
|
||||||
//%
|
//%
|
||||||
|
Loading…
Reference in New Issue
Block a user