Closed Stevebel closed 1 year ago
I want to make sure I'm properly understanding the context of this fix. I believe the bug would only occur when a line length is explicitly specified as a negative number for format()
. (For example, format("blah", -1)
). But that begs the question of "why were you explicitly specifying -1
in your script"? Is that an actual use case for you?
Sorry for the late response. It's the opposite, that variable is -1 if nothing is specified. The problem is that it was checking before the variable was populated with the configuration. You can see the updated test fails with the old code and passes with the new code
Ahhh, I see now. It's the fontID
that was being read to early. Thanks for fixing. As you can see, the current format
-related tests aren't great. I'll beef those up after merging this PR.
I set up a font_config.json with two fonts with different
maxLineLength
s to handle different dialogue windows in my mod but found that applying those font IDs weren't changing the line length. Set up a test to reproduce along with a fix.