aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBradley Lewis <22850972+BradLewis@users.noreply.github.com>2025-09-19 09:21:26 -0400
committerGitHub <noreply@github.com>2025-09-19 09:21:26 -0400
commit7ff84eb0b24912db1b3f3b0cff323e1728f47b0b (patch)
treea18bb1dacba6ff52bd74461441058623b572d644 /src
parent5bf8612ce6f39f8e7a1774b09948ddecdeb471d3 (diff)
parente6a3b84466e13abd74e81068ee7f06f7c4c569a3 (diff)
Merge pull request #1015 from godalming123/master
Use core:flags instead of custom flag parsing code and fix 2 bugs
Diffstat (limited to 'src')
-rw-r--r--src/odin/printer/document.odin2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/odin/printer/document.odin b/src/odin/printer/document.odin
index f3ef61e..5fba1b9 100644
--- a/src/odin/printer/document.odin
+++ b/src/odin/printer/document.odin
@@ -447,7 +447,7 @@ format :: proc(width: int, list: ^[dynamic]Tuple, builder: ^strings.Builder, p:
if v.amount > 0 {
flush_line_suffix(builder, &suffix_builder)
// ensure we strip any misplaced trailing whitespace
- for builder.buf[len(builder.buf)-1] == ' ' {
+ for len(builder.buf) > 0 && builder.buf[len(builder.buf) - 1] == ' ' {
pop(&builder.buf)
}
for i := 0; i < v.amount; i += 1 {