projects
/
ulas
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
15fd59b
)
Removed a magick number
author
Lukas Krickl
<lukas@krickl.dev>
Sun, 18 Feb 2024 03:58:23 +0000
(
04:58
+0100)
committer
Lukas Krickl
<lukas@krickl.dev>
Sun, 18 Feb 2024 03:58:23 +0000
(
04:58
+0100)
src/ulas.c
patch
|
blob
|
history
diff --git
a/src/ulas.c
b/src/ulas.c
index c26cd8df1e08e6f609fa263d7d647353246e9b98..a49b0d9fa6a88bf4f6cbd25f57abe1ac9e4a7471 100644
(file)
--- 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;
}