Skip to content

Commit

Permalink
fix incorrect path separator when looking for submodule entries in da…
Browse files Browse the repository at this point in the history
…ta.pak on windows
  • Loading branch information
ianmaclarty committed Feb 6, 2019
1 parent a52cf9b commit 6c35ccf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/am_lua_util.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ int am_require(lua_State *L) {
// read in the module
int sz;
strncpy(tmpbuf1, modname, TMP_BUF_SZ);
am_replchr(tmpbuf1, '.', AM_PATH_SEP);
am_replchr(tmpbuf1, '.', '/'); // always use forward slash, even on windows, in case we're looking in data.pak (/ works for normal files on windows anyway)
snprintf(tmpbuf2, TMP_BUF_SZ, "%s.lua", tmpbuf1);
char *errmsg;
void *buf = am_read_resource(tmpbuf2, &sz, &errmsg);
Expand Down

0 comments on commit 6c35ccf

Please sign in to comment.