瀏覽代碼

mbstowcs() returns the codepoints

master
Arun Prakash Jana 7 年之前
父節點
當前提交
ccdb95f3ab
沒有發現已知的金鑰在資料庫的簽署中 GPG 金鑰 ID: A75979F35C080412
共有 1 個檔案被更改,包括 2 行新增3 行删除
  1. +2
    -3
      nnn.c

+ 2
- 3
nnn.c 查看文件

@@ -1013,10 +1013,9 @@ xreadline(char *fname)
size_t buflen = NAME_MAX - 1;

DPRINTF_S(fname)
mbstowcs(buf, fname, NAME_MAX);
len = pos = wcslen(buf);
len = pos = mbstowcs(buf, fname, NAME_MAX);
/* For future: handle NULL, say for a new name */
if (len <= 0) {
if (len == (size_t)-1) {
buf[0] = '\0';
len = pos = 0;
}


Loading…
取消
儲存