diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2025-01-26 14:25:51 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2025-01-26 14:25:51 (GMT) |
commit | 56c148de74ed8c78ce54ed24daa83ec2f641e054 (patch) | |
tree | d4e43da9d6c729146c77fb30de8fa3767b257afb /src/glibext/strbuilder.c | |
parent | b1227a2779c9a72cab1295a1419a9c990df6488e (diff) |
Define new interfaces for arch operands.
Diffstat (limited to 'src/glibext/strbuilder.c')
-rw-r--r-- | src/glibext/strbuilder.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/glibext/strbuilder.c b/src/glibext/strbuilder.c index 54a102b..e48674c 100644 --- a/src/glibext/strbuilder.c +++ b/src/glibext/strbuilder.c @@ -2,7 +2,7 @@ /* Chrysalide - Outil d'analyse de fichiers binaires * strbuilder.c - exportation d'une chaîne de caractères depuis un élément * - * Copyright (C) 2024 Cyrille Bagard + * Copyright (C) 2025 Cyrille Bagard * * This file is part of Chrysalide. * @@ -51,6 +51,7 @@ G_DEFINE_INTERFACE(GStringBuilder, g_string_builder, G_TYPE_OBJECT) static void g_string_builder_default_init(GStringBuilderInterface *iface) { + iface->to_string = NULL; } @@ -77,7 +78,11 @@ bool g_string_builder_to_string(const GStringBuilder *builder, unsigned int flag iface = G_STRING_BUILDER_GET_IFACE(builder); - result = iface->to_string(builder, flags, out); + if (iface->to_string == NULL) + result = false; + + else + result = iface->to_string(builder, flags, out); return result; |