Rework ansi file display in lua

This commit is contained in:
Andrew Pamment 2017-10-11 17:01:40 +10:00
parent 78f21e9740
commit ced7a4e2cf

View File

@ -45,10 +45,12 @@ int l_bbsDisplayAnsiPause(lua_State *L) {
char *str = (char *)lua_tostring(L, -1);
char buffer[256];
sprintf(buffer, "%s/%s.ans", conf.ansi_path, str);
s_displayansi_pause(buffer, 1);
if (strchr(str, '/') == NULL) {
sprintf(buffer, "%s/%s.ans", conf.ansi_path, str);
s_displayansi_pause(buffer, 1);
} else {
s_displayansi_pause(str, 1);
}
return 0;
}