Introduction
Introduction Statistics Contact Development Disclaimer Help
Use unsigned semantics in char comparison - noice - small file browser (mirror …
git clone git://git.codemadness.org/noice
Log
Files
Refs
README
LICENSE
---
commit 2df9740f6c8bfe691bccadf4e87aec7a78d4f81f
parent b2f2a6fe76bdbba48c0174b4f1eb05caf1a74b71
Author: Lazaros Koromilas <[email protected]>
Date: Mon, 8 Apr 2019 12:59:12 +0300
Use unsigned semantics in char comparison
Unicode entries appear in the same order as with default sorting.
Diffstat:
M strverscmp.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/strverscmp.c b/strverscmp.c
@@ -11,8 +11,8 @@ strverscmp(const char *str1, const char *str2)
size_t i1 = 0;
size_t i2 = 0;
for (; i1 < len1 && i2 < len2; i1++, i2++) {
- char c1 = str1[i1];
- char c2 = str2[i2];
+ unsigned char c1 = str1[i1];
+ unsigned char c2 = str2[i2];
if (isdigit(c1) && isdigit(c2)) {
unsigned long long int num1;
unsigned long long int num2;
You are viewing proxied material from codemadness.org. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.