mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-01 20:28:15 +00:00
Only override the comma value on *_init if it is "invalid"
This commit is contained in:
@@ -17,7 +17,10 @@ Writer :: struct {
|
||||
|
||||
// writer_init initializes a Writer that writes to w
|
||||
writer_init :: proc(writer: ^Writer, w: io.Writer) {
|
||||
writer.comma = ','
|
||||
switch writer.comma {
|
||||
case '\x00', '\n', '\r', 0xfffd:
|
||||
writer.comma = ','
|
||||
}
|
||||
writer.w = w
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user