浏览代码

Ignore case in version compare

master
Arun Prakash Jana 5 年前
父节点
当前提交
1b06828819
找不到此签名对应的密钥 GPG 密钥 ID: A75979F35C080412
共有 1 个文件被更改,包括 8 次插入4 次删除
  1. +8
    -4
      src/nnn.c

+ 8
- 4
src/nnn.c 查看文件

@@ -1310,8 +1310,10 @@ static int xstrverscmp(const char * const s1, const char * const s2)
if (p1 == p2)
return 0;

c1 = *p1++;
c2 = *p2++;
c1 = TOUPPER(*p1);
++p1;
c2 = TOUPPER(*p2);
++p2;

/* Hint: '0' is a digit too. */
state = S_N + ((c1 == '0') + (xisdigit(c1) != 0));
@@ -1321,8 +1323,10 @@ static int xstrverscmp(const char * const s1, const char * const s2)
return diff;

state = next_state[state];
c1 = *p1++;
c2 = *p2++;
c1 = TOUPPER(*p1);
++p1;
c2 = TOUPPER(*p2);
++p2;
state += (c1 == '0') + (xisdigit(c1) != 0);
}



正在加载...
取消
保存