mirror of https://github.com/rusefi/lua.git
small bug
This commit is contained in:
parent
a535ad6fee
commit
942496d767
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
** $Id: lauxlib.c,v 1.119 2004/07/01 14:26:28 roberto Exp roberto $
|
** $Id: lauxlib.c,v 1.120 2004/07/09 18:23:17 roberto Exp roberto $
|
||||||
** Auxiliary functions for building Lua libraries
|
** Auxiliary functions for building Lua libraries
|
||||||
** See Copyright Notice in lua.h
|
** See Copyright Notice in lua.h
|
||||||
*/
|
*/
|
||||||
|
@ -383,9 +383,10 @@ static const char *luaL_gsub (lua_State *L, const char *s,
|
||||||
LUALIB_API const char *luaL_searchpath (lua_State *L, const char *name,
|
LUALIB_API const char *luaL_searchpath (lua_State *L, const char *name,
|
||||||
const char *path) {
|
const char *path) {
|
||||||
FILE *f;
|
FILE *f;
|
||||||
const char *p = path;
|
const char *p;
|
||||||
if (p == NULL) p = getpath(L);
|
if (path == NULL) path = getpath(L);
|
||||||
else lua_pushnil(L); /* to balance item pushed by `getpath' */
|
else lua_pushnil(L); /* to balance item pushed by `getpath' */
|
||||||
|
p = path;
|
||||||
for (;;) {
|
for (;;) {
|
||||||
const char *fname;
|
const char *fname;
|
||||||
if ((p = pushnexttemplate(L, p)) == NULL) {
|
if ((p = pushnexttemplate(L, p)) == NULL) {
|
||||||
|
|
Loading…
Reference in New Issue