| 445 | } |
| 446 | |
| 447 | UTF8 *getCurrentModVarName(UTF8 *buffer, U32 bufsize) |
| 448 | { |
| 449 | char varName[256]; |
| 450 | StringTableEntry cbName = CodeBlock::getCurrentCodeBlockName(); |
| 451 | |
| 452 | const UTF8 *slash = (const UTF8*)dStrchr(cbName, '/'); |
| 453 | if (slash == NULL) |
| 454 | { |
| 455 | Con::errorf("Illegal CodeBlock path detected in sanitiseVarName() (no mod directory): %s", cbName); |
| 456 | return NULL; |
| 457 | } |
| 458 | |
| 459 | dStrncpy(varName, cbName, slash - (const UTF8*)cbName); |
| 460 | varName[slash - (const UTF8*)cbName] = 0; |
| 461 | |
| 462 | return sanitiseVarName((UTF8*)varName, buffer, bufsize); |
| 463 | } |
| 464 | |
| 465 | const LangTable *getCurrentModLangTable() |
| 466 | { |
no test coverage detected