Skip to content

Remove redundant null terminator in sexpr-process.c format stringRemove redundant null terminator in sexpr-process.c format string#28

Open
preetsinghi21 wants to merge 2 commits intokovzol:masterfrom
preetsinghi21:master
Open

Remove redundant null terminator in sexpr-process.c format stringRemove redundant null terminator in sexpr-process.c format string#28
preetsinghi21 wants to merge 2 commits intokovzol:masterfrom
preetsinghi21:master

Conversation

@preetsinghi21
Copy link
Copy Markdown

Problem

In src/sexpr-process.c, a format string contained a redundant \0
(null terminator) embedded inside it. This is unnecessary because C
strings are already null-terminated by default. Including an explicit
\0 in a format string passed to functions like printf or fprintf
causes the string to be silently truncated at that point — anything
after it won't be printed/processed.

Fix

Removed the redundant \0 from the format string, allowing the full
string to be processed correctly.

Impact

  • Prevents silent output truncation
  • Cleans up potentially misleading code
  • No functional regression — behavior is correct after the fix

…ized

When elim_sen[1] != '(', the previous code would continue the loop
with no possibility of cmp becoming 1, causing an infinite loop and
hanging Aris during proof verification. Replace continue with break
since a non-parenthesized elim_sen can never match.

Fixes kovzol#25
@kovzol
Copy link
Copy Markdown
Owner

kovzol commented Feb 26, 2026

Thanks for your work on this! Do you have an example (a .tle file, optimally) where the old code crashes and the new code does not?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants