faster startup and fix asan error

This commit is contained in:
2026-02-19 03:47:30 -06:00
parent 06ad466b1a
commit 38f368c6d6
5 changed files with 21 additions and 23 deletions

View File

@@ -27,7 +27,7 @@ typedef struct letter {
// #define ACTOR_TRACE
#define ACTOR_FAST_TIMER_NS (10ULL * 1000000) // 10ms per turn
#define ACTOR_SLOW_TIMER_NS (5000ULL * 1000000) // 5s for slow actors
#define ACTOR_SLOW_TIMER_NS (60000ULL * 1000000) // 60s for slow actors
#define ACTOR_SLOW_STRIKES_MAX 3 // consecutive slow turns -> kill
#define ACTOR_MEMORY_LIMIT (16ULL * 1024 * 1024) // 16MB heap cap

View File

@@ -54,6 +54,7 @@ static int rangematch(const char *, char, int, const char **);
int wildmatch(const char *pattern, const char *string, int flags)
{
const char *patternstart = pattern;
const char *stringstart;
const char *newp;
const char *slash;
@@ -87,7 +88,7 @@ int wildmatch(const char *pattern, const char *string, int flags)
c = *pattern;
wild = check_flag(flags, WM_WILDSTAR) && c == '*';
if (wild) {
prev = pattern[-2];
prev = (pattern >= patternstart + 2) ? pattern[-2] : EOS;
/* Collapse multiple stars and slash-** patterns,
* e.g. "** / *** / **** / **" (without spaces)
* is treated as a single ** wildstar.