Removed a magick number
authorLukas Krickl <lukas@krickl.dev>
Sun, 18 Feb 2024 03:58:23 +0000 (04:58 +0100)
committerLukas Krickl <lukas@krickl.dev>
Sun, 18 Feb 2024 03:58:23 +0000 (04:58 +0100)
src/ulas.c

index c26cd8df1e08e6f609fa263d7d647353246e9b98..a49b0d9fa6a88bf4f6cbd25f57abe1ac9e4a7471 100644 (file)
@@ -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;
   }