Skip to content

Commit dbb69c3

Browse files
committed
fix(common): fix comparison national items
1 parent c3d9146 commit dbb69c3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

libcob/common.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -590,7 +590,7 @@ national_cmps (const unsigned char *s1, const unsigned char *s2, const size_t si
590590
}
591591
#else /*!I18N_UTF8*/
592592
for (i = 0; i < size && !ret; i += 2) {
593-
ret = ((s1[i] <<8 | s1[i + 1]) > (s2[i] <<8 | s2[i + 1]));
593+
ret = ((s1[i] <<8 | s1[i + 1]) - (s2[i] <<8 | s2[i + 1]));
594594
}
595595
#endif /*I18N_UTF8*/
596596
return ret;

0 commit comments

Comments
 (0)