aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2022-09-22 00:36:31 +0100
committergingerBill <bill@gingerbill.org>2022-09-22 00:36:31 +0100
commit0ddf1bf6603b2ea647f8c71b1bb5e26faf3e0807 (patch)
treefc87cc051076472c0ffbb95f3fff59cffc94471f
parentdade5b5ef2ee5a35cbe2c5a3d524cbc3e84402f0 (diff)
Minor style change
-rw-r--r--src/check_expr.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/check_expr.cpp b/src/check_expr.cpp
index 0a42c6618..83df0fa4e 100644
--- a/src/check_expr.cpp
+++ b/src/check_expr.cpp
@@ -2046,16 +2046,15 @@ bool check_is_expressible(CheckerContext *ctx, Operand *o, Type *type) {
gbString a = expr_to_string(o->expr);
gbString b = type_to_string(type);
gbString c = type_to_string(o->type);
+ gbString s = exact_value_to_string(o->value);
defer(
+ gb_string_free(s);
gb_string_free(c);
gb_string_free(b);
gb_string_free(a);
o->mode = Addressing_Invalid;
);
- gbString s = exact_value_to_string(o->value);
- defer (gb_string_free(s));
-
if (is_type_numeric(o->type) && is_type_numeric(type)) {
if (!is_type_integer(o->type) && is_type_integer(type)) {
error(o->expr, "'%s' truncated to '%s', got %s", a, b, s);