Skip to content

Commit

Permalink
type_to_string: detect type failure in DEVELOPER mode.
Browse files Browse the repository at this point in the history
Signed-off-by: Rusty Russell <[email protected]>
  • Loading branch information
rustyrussell authored and cdecker committed Sep 21, 2021
1 parent 2736e99 commit 1f8564f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions common/type_to_string.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ const char *type_to_string_(const tal_t *ctx, const char *typename,
break;
}
}
#if DEVELOPER
assert(s);
#endif
if (!s)
s = tal_fmt(ctx, "UNKNOWN TYPE %s", typename);

Expand Down

0 comments on commit 1f8564f

Please sign in to comment.