# HG changeset patch # User Siddharth Agarwal # Date 2015-03-25 23:21:58 # Node ID 40b05303ac321fc245058e092e442f26562ae6a3 # Parent 05ccfe6763f11a1903bf69f4ba6a9580199d831d osutil: mark end of string with null char, not 0 Noticed this while working on other stuff in the area. diff --git a/mercurial/osutil.c b/mercurial/osutil.c --- a/mercurial/osutil.c +++ b/mercurial/osutil.c @@ -343,7 +343,7 @@ static PyObject *_listdir_stat(char *pat #else strncpy(fullpath + pathlen + 1, ent->d_name, PATH_MAX - pathlen); - fullpath[PATH_MAX] = 0; + fullpath[PATH_MAX] = '\0'; err = lstat(fullpath, &st); #endif if (err == -1) {