diff --git a/lua.c b/lua.c index 5b5700f1..04257801 100644 --- a/lua.c +++ b/lua.c @@ -660,7 +660,7 @@ luaA_parserc(const char *confpatharg) confpath = p_new(char, len); a_strcpy(confpath, len, confdir); /* update package.path */ - snprintf(path, sizeof(path) - 1, "package.path = package.path .. \";%s/awesome/?.lua\"", confdir); + snprintf(path, sizeof(path), "package.path = package.path .. \";%s/awesome/?.lua\"", confdir); luaA_dostring(globalconf.L, path); } else @@ -671,7 +671,7 @@ luaA_parserc(const char *confpatharg) a_strcpy(confpath, len, confdir); a_strcat(confpath, len, XDG_CONFIG_HOME_DEFAULT); /* update package.path */ - snprintf(path, sizeof(path) - 1, "package.path = package.path .. \";%s" XDG_CONFIG_HOME_DEFAULT "/awesome/?.lua\"", confdir); + snprintf(path, sizeof(path), "package.path = package.path .. \";%s" XDG_CONFIG_HOME_DEFAULT "/awesome/?.lua\"", confdir); luaA_dostring(globalconf.L, path); } a_strcat(confpath, len, AWESOME_CONFIG_FILE); @@ -698,7 +698,7 @@ luaA_parserc(const char *confpatharg) confpath = p_new(char, len); a_strcpy(confpath, len, *buf); a_strcat(confpath, len, AWESOME_CONFIG_FILE); - snprintf(path, sizeof(path) - 1, "package.path = package.path .. \";%s/awesome/?.lua\"", *buf); + snprintf(path, sizeof(path), "package.path = package.path .. \";%s/awesome/?.lua\"", *buf); luaA_dostring(globalconf.L, path); if(luaL_dofile(globalconf.L, confpath)) fprintf(stderr, "%s\n", lua_tostring(globalconf.L, -1));