From a453554e412b2fe0d47294e3c121b104e9194fa7 Mon Sep 17 00:00:00 2001 From: Daniel Stelzer Date: Sat, 29 Aug 2026 12:37:54 -0500 Subject: [PATCH 1/2] =?UTF-8?q?improve=20messages=20when=20adding=20resour?= =?UTF-8?q?ce=20files=20on=20=C3=85-machine?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/backend_aa.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/backend_aa.c b/src/backend_aa.c index e251365a..24490270 100644 --- a/src/backend_aa.c +++ b/src/backend_aa.c @@ -176,7 +176,7 @@ static uint8_t resolve_aachar(uint32_t uchar) { } if(i >= 128) { - report(LVL_ERR, 0, "Too many distinct unicode characters in the text."); + report(LVL_ERR, 0, "Too many distinct Unicode characters in the text."); exit(1); } @@ -3547,6 +3547,14 @@ static void chunks_file(FILE *f, struct program *prg, char *resdir) { exit(1); } size = (uint32_t) st.st_size; + if(size == 0) { + report( + LVL_ERR, + prg->resources[i].line, + "Resource file \"%s\" is empty", + path); + exit(1); + } buf = malloc(size); if(1 != fread(buf, size, 1, datafile)) { report( @@ -3565,6 +3573,8 @@ static void chunks_file(FILE *f, struct program *prg, char *resdir) { if(pad) fputc(0, f); free(buf); free(pathbuf); + + report(LVL_DEBUG, 0, "Added resource file %s (%d bytes)", prg->resources[i].stem, size); } } } From 83e5a7aef103a79f0eac6603fa5e18127daceb83 Mon Sep 17 00:00:00 2001 From: Daniel Stelzer Date: Sat, 29 Aug 2026 12:39:36 -0500 Subject: [PATCH 2/2] readme --- readme.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/readme.txt b/readme.txt index 3e9c5f76..4eea6155 100644 --- a/readme.txt +++ b/readme.txt @@ -45,10 +45,13 @@ Release notes: 1c/03, Lib 1.2.4: - Compiler: Patched over a bug with non-ASCII word separators. + Compiler: patched over a bug with non-ASCII word separators. The problem isn't really fixed, but it will no longer corrupt your game text. + Compiler: better messages when adding resource files to an + .aastory file, on both success and failure + Unit test runner: (game over) and (game over $) are now overridden in unit.dg, to enable testing of win conditions.