From faf27c7c75d29fd549f873b1a27a7b3ad390e3ac Mon Sep 17 00:00:00 2001 From: tildearrow Date: Fri, 5 Jul 2024 19:52:54 -0500 Subject: [PATCH] work around compiler crap --- src/main.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/main.cpp b/src/main.cpp index b97c04355..7eefcede1 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -606,7 +606,13 @@ int main(int argc, char** argv) { strncpy(localeDir,localeDirs[i],4095); #else if (exePath[0]!=0 && localeDirs[i][0]!=DIR_SEPARATOR) { - strncpy(localeDir,exePath,4095); + // do you NOT understand what memset IS + char* i_s=exePath; + for (int i_i=0; i_i<4095; i_i++) { + localeDir[i_i]=*i_s; + if ((*i_s)==0) break; + i_s++; + } strncat(localeDir,DIR_SEPARATOR_STR,4095); strncat(localeDir,localeDirs[i],4095); } else {