From: Lukas Krickl Date: Sun, 18 Feb 2024 03:58:23 +0000 (+0100) Subject: Removed a magick number X-Git-Url: https://git.krickl.dev/?a=commitdiff_plain;h=0f97d1da43d5e3d41104d7f784ef3f8ffa47692c;p=ulas%2F.git Removed a magick number --- diff --git a/src/ulas.c b/src/ulas.c index c26cd8d..a49b0d9 100644 --- a/src/ulas.c +++ b/src/ulas.c @@ -2143,10 +2143,11 @@ const struct ulas_instr ULASINSTRS[] = { {NULL}}; +#define ULAS_INSTRBUF_MIN 4 int ulas_asminstr(char *dst, unsigned long max, const char **line, unsigned long n) { const char *start = *line; - if (max < 4) { + if (max < ULAS_INSTRBUF_MIN) { ULASPANIC("Instruction buffer is too small!"); return -1; }