diff --git a/WatMakefile b/WatMakefile index 2318207..633a259 100644 --- a/WatMakefile +++ b/WatMakefile @@ -1,4 +1,4 @@ -CC = wcc386 -bt=nt -q -bd +CC = wcc386 -bt=nt -q -bd -d3 LD = wlink option quiet CFLAGS = -i=include -i=external/libz/include -d_MILSKO -dUSE_GDI -dUSE_STB_TRUETYPE -dUSE_STB_IMAGE -dSTBI_NO_SIMD diff --git a/src/string.c b/src/string.c index 2a15046..a7c2338 100644 --- a/src/string.c +++ b/src/string.c @@ -51,18 +51,12 @@ void MwStringPrintIntoBuffer(char* out, MwU32 size, const char* fmt, ...) { }; MWDECL MwBool MwStringIsKeyUTF8(MwU32 key) { - /* little endian */ -#if defined(__x86_64__) || defined(_M_X64) || defined(__i386) || defined(_M_IX86) || defined(__aarch64__) || defined(_M_ARM64) - unsigned char bytes[4] = { - (key & 0x000000FF), - (key & 0x0000FF00) >> 8, - (key & 0x00FF0000) >> 16, - (key & 0xFF000000) >> 24, - }; -#else -#error Unspecified architecture! This error exists here because above it is endian-specific code. Add your architecture above. -#endif + unsigned char bytes[4]; int i; + bytes[0] = (key & 0x000000FF); + bytes[1] = (key & 0x0000FF00) >> 8; + bytes[2] = (key & 0x00FF0000) >> 16; + bytes[3] = (key & 0xFF000000) >> 24; for(i = 0; i < sizeof(MwU32); i++) { if(( // ASCII