diff options
author | Luke T. Shumaker <lukeshu@lukeshu.com> | 2025-05-17 13:33:51 -0600 |
---|---|---|
committer | Luke T. Shumaker <lukeshu@lukeshu.com> | 2025-05-17 13:33:51 -0600 |
commit | 42fb27570262b52e2ca889030c621b5f4af76fe1 (patch) | |
tree | 1d70f96baa5089f8878a9c121ff0770846ad4090 /lib9p/core_gen/c_fmt_print.py | |
parent | 18ddce6270391e5c1924394f8b5d8079ad73289e (diff) | |
parent | 556f3ff6ccb9fa4b193d91216f85e8ade33b4383 (diff) |
Diffstat (limited to 'lib9p/core_gen/c_fmt_print.py')
-rw-r--r-- | lib9p/core_gen/c_fmt_print.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib9p/core_gen/c_fmt_print.py b/lib9p/core_gen/c_fmt_print.py index eaacddb..7a0a9d3 100644 --- a/lib9p/core_gen/c_fmt_print.py +++ b/lib9p/core_gen/c_fmt_print.py @@ -112,7 +112,7 @@ def gen_c_fmt_print(versions: set[str], typs: list[idl.UserType]) -> str: cnt_str = f"self->{member.cnt.membname}" cnt_typ = c9util.typename(member.cnt.typ) if member.typ.static_size == 1: # SPECIAL (data) - ret += f"\tif (is_valid_utf8_without_nul((uint8_t *)self->{member.membname}, (size_t){cnt_str})) {{\n" + ret += f"\tif (utf8_is_valid_without_nul((uint8_t *)self->{member.membname}, (size_t){cnt_str})) {{\n" ret += f'\t\tfmt_print_str(w, " {member.membname}=");\n' ret += f"\t\tfmt_print_qmem(w, self->{member.membname}, {cnt_str} < 50 ? {cnt_str} : 50);\n" ret += f"\t\tif ({cnt_str} > 50)\n" |