Permalink
Browse files

winapi-tmpfile: fixed sign-compare issue

  • Loading branch information...
Snaipe committed May 21, 2017
1 parent e2e6fa0 commit b73b3d8b570c2f79df5a0b071efba392a82ddcd7
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/fmem-winapi-tmpfile.c
@@ -59,7 +59,7 @@ FILE *fmem_open(fmem *file, const char *mode)
int wb = snprintf(&path[rc], MAX_PATH - rc, "\\fmem%x.tmp", randnum);
if (wb < 0)
return NULL;
if (wb > MAX_PATH - rc) {
if ((DWORD)wb > (DWORD)MAX_PATH - rc) {
errno = ENAMETOOLONG;
return NULL;
}

0 comments on commit b73b3d8

Please sign in to comment.