jimtcl
jimtcl copied to clipboard
Constant comparison
trafficstars
https://github.com/msteveb/jimtcl/blob/9784dcf88e8f0204550b4218f1c77bfa510a497b/jim-format.c#L404
length should always <= 320, so the length > 10000 comparison will always evaluate to false.
Thanks for the report. I didn't write this code and I haven't looked through it carefully. You are probably right, but what if the code is modified in the future and length could be unreasonably long? I'm not sure if removing a single always-false comparison is worth it.