diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2005-07-11 13:41:51 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2005-07-11 13:41:51 -0300 |
commit | 3d08aa591ddbfdaff49804baf09ea5044c29c9c9 (patch) | |
tree | 9df9b56462bed824bb5b540cff3c5105e4805ca5 /lauxlib.c | |
parent | 0f30d00c872b4dc4b77daabc55d72338dcc31847 (diff) | |
download | lua-3d08aa591ddbfdaff49804baf09ea5044c29c9c9.tar.gz lua-3d08aa591ddbfdaff49804baf09ea5044c29c9c9.tar.bz2 lua-3d08aa591ddbfdaff49804baf09ea5044c29c9c9.zip |
details
Diffstat (limited to 'lauxlib.c')
-rw-r--r-- | lauxlib.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lauxlib.c,v 1.137 2005/05/31 14:34:02 roberto Exp roberto $ | 2 | ** $Id: lauxlib.c,v 1.138 2005/07/11 14:01:28 roberto Exp roberto $ |
3 | ** Auxiliary functions for building Lua libraries | 3 | ** Auxiliary functions for building Lua libraries |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -327,9 +327,9 @@ LUALIB_API int luaL_getn (lua_State *L, int t) { | |||
327 | 327 | ||
328 | static const char *pushnexttemplate (lua_State *L, const char *path) { | 328 | static const char *pushnexttemplate (lua_State *L, const char *path) { |
329 | const char *l; | 329 | const char *l; |
330 | while (*path == *LUA_PATHSEP) path++; /* skip separators */ | ||
330 | if (*path == '\0') return NULL; /* no more templates */ | 331 | if (*path == '\0') return NULL; /* no more templates */ |
331 | if (*path == LUA_PATHSEP) path++; /* skip separator */ | 332 | l = strchr(path, *LUA_PATHSEP); /* find next separator */ |
332 | l = strchr(path, LUA_PATHSEP); /* find next separator */ | ||
333 | if (l == NULL) l = path+strlen(path); | 333 | if (l == NULL) l = path+strlen(path); |
334 | lua_pushlstring(L, path, l - path); /* template */ | 334 | lua_pushlstring(L, path, l - path); /* template */ |
335 | return l; | 335 | return l; |