aboutsummaryrefslogtreecommitdiff
path: root/src/warnings.c
diff options
context:
space:
mode:
authorMarvin Borner2021-04-20 17:42:10 +0200
committerMarvin Borner2021-04-20 17:43:30 +0200
commit5e257cbf702e57fd55f8477a63236bdb9ce454f4 (patch)
tree09567e1f12f8e617ebd3cfa17e0b773c026c57af /src/warnings.c
parentfbf9cfee0d22a2750b894c2ddb19dff2a50810b4 (diff)
Awesome stuff
Diffstat (limited to 'src/warnings.c')
-rw-r--r--src/warnings.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/warnings.c b/src/warnings.c
index d9c7be6..b5a7851 100644
--- a/src/warnings.c
+++ b/src/warnings.c
@@ -11,7 +11,7 @@
struct warning {
u8 exists;
- struct context *ctx;
+ struct context ctx;
char text[WARNING_LENGTH];
};
@@ -22,7 +22,7 @@ void warnings_add(struct context *ctx, const char *fmt, ...)
assert(warning_index + 1 < WARNING_COUNT);
warnings[warning_index].exists = 1;
- warnings[warning_index].ctx = ctx;
+ warnings[warning_index].ctx = *ctx;
va_list ap;
va_start(ap, fmt);
@@ -40,7 +40,7 @@ void warnings_print(void)
continue;
/* gui_show_warning(warnings[i].text); */
- printf("Line %d:%d: %s\n", warnings[i].ctx->line, warnings[i].ctx->column,
+ printf("Line %d:%d: %s\n", warnings[i].ctx.line, warnings[i].ctx.column,
warnings[i].text);
}
}