| 347 | } |
| 348 | |
| 349 | DISABLE_WARNING_FORMAT_NONLITERAL |
| 350 | |
| 351 | /* the #wizloadlua command - load an arbitrary lua file */ |
| 352 | int |
| 353 | wiz_load_lua(void) |
| 354 | { |
| 355 | if (wizard) { |
| 356 | char buf[BUFSZ]; |
| 357 | /* Large but not unlimited memory and CPU so random bits of |
| 358 | * code can be tested by wizards. */ |
| 359 | nhl_sandbox_info sbi = {NHL_SB_SAFE | NHL_SB_DEBUGGING, |
| 360 | 16*1024*1024, 0, 16*1024*1024}; |
| 361 | |
| 362 | buf[0] = '\0'; |
| 363 | getlin("Load which lua file?", buf); |
| 364 | if (buf[0] == '\033' || buf[0] == '\0') |
| 365 | return ECMD_CANCEL; |
| 366 | if (!strchr(buf, '.')) |
| 367 | strcat(buf, ".lua"); |
| 368 | (void) load_lua(buf, &sbi); |
| 369 | } else |
| 370 | pline(unavailcmd, ecname_from_fn(wiz_load_lua)); |
| 371 | return ECMD_OK; |
| 372 | } |
| 373 | |
| 374 | /* the #wizloaddes command - load a special level lua file */ |
| 375 | int |
nothing calls this directly
no test coverage detected