From: Bart House Date: Sat, 2 Sep 2017 18:29:23 +0000 (-0700) Subject: Fixed coding error. strlen() returns size_t causing a size_t sized value pushed onto... X-Git-Tag: NetHack-3.6.1_RC01~404 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=878a18388ce3a83117d7f8d0c6a5a76605364f50;p=nethack Fixed coding error. strlen() returns size_t causing a size_t sized value pushed onto stack instead of long. On x64 builds, size_t != long. Caught via compiler warning in x64 build. --- diff --git a/util/dlb_main.c b/util/dlb_main.c index 0a4b938dd..6cda2b3ab 100644 --- a/util/dlb_main.c +++ b/util/dlb_main.c @@ -506,7 +506,7 @@ long slen, dir_size, flen; (long) DLB_VERS, /* version of dlb file */ (long) nfiles + 1, /* # of entries (includes directory) */ /* string length + room for nulls */ - (long) slen + strlen(DLB_DIRECTORY) + nfiles + 1, + (long) slen + (long) strlen(DLB_DIRECTORY) + nfiles + 1, (long) dir_size, /* start of first file */ (long) flen + dir_size); /* total file size */ Write(out, buf, strlen(buf));