Re: [hatari-devel] Problems with some FPU tests |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/hatari-devel Archives
]
On Dienstag, 24. April 2018 16:26:14 CEST Thorsten Otto wrote:
> But now i have a similar problem when trying to add --mmu true for cpulevels
> that support it, some of the tests then fail with an assertion:
>
> hatari: /home/sebilla/atari/hatari/src/statusbar.c:591:
> Statusbar_UpdateInfo: Assertion `end - DefaultMessage.msg <
> MAX_MESSAGE_LEN' failed.
That assertion was just caused by the status message becoming too long.
With MMU+FPU enabled, the message line looked like this:
32MHz/030/68882/MMU 1MB ST(WS3), TOS v0.00, RGB 60 Hz, ------
which is 61 chars. The attached patch should fix that.
diff -r 190455576334 src/statusbar.c
--- a/src/statusbar.c Mon Apr 23 10:33:37 2018 +0200
+++ b/src/statusbar.c Thu Apr 26 13:50:47 2018 +0200
@@ -105,7 +105,7 @@
static Uint32 GrayBg, LedColorBg;
/* needs to be enough for all messages, but <= MessageRect width / font width */
-#define MAX_MESSAGE_LEN 60
+#define MAX_MESSAGE_LEN 65
typedef struct msg_item {
struct msg_item *next;
char msg[MAX_MESSAGE_LEN+1];
@@ -588,7 +588,7 @@
}
*end = '\0';
- assert(end - DefaultMessage.msg < MAX_MESSAGE_LEN);
+ assert((end - DefaultMessage.msg) < MAX_MESSAGE_LEN);
DEBUGPRINT(("Set default message: '%s'\n", DefaultMessage.msg));
/* make sure default message gets (re-)drawn when next checked */
DefaultMessage.shown = false;