Allows user-facing JSON5/SJSON to have comments explaining field usage.
`json.Marshal_Options.pretty` must be enabled since we only use single-line comments (not to mention it wouldn't be terribly useful without `pretty` set anyways).
We don't escape anything, so `\n` will display as "\n", but you're still able to enter in a proper newline character and it'll be displayed on multiple lines.
Fix a bug where padding characters in the middle of input were
not detected when there was no trailing padding.
The "verify no padding in middle" check was inside `if
padding_count > 0`, so inputs like "MZ===YTBMZXW6YTB" would
incorrectly pass validation.
Test case added for this edge case.
This change was made in order to allow things produced with Odin and using Odin's core library, to not require the LICENSE to also be distributed alongside the binary form.
The initial allocation for the slice is limited to prevent untrusted
data from forcing a huge allocation, but then the dynamic array was
created with a capacity of the unlimited length, rather than the actual
capacity of the allocation. This was causing a buffer overrun.
No more:
```
We could not find the procedure "pkg_foo_example :: proc()" needed to test the example created for "pkg.foo"
The following procedures were found:
bar()
```
Add `@(rodata)` attribute to `ENC_TABLE` and `DEC_TABLE` to mark
them as read-only data. This places these tables in the read-only
section of the executable, protecting them from modification
during program execution.
Fix incorrect RFC 4648 section references:
- Add RFC URL reference at package level
- Update Error enum documentation to reference correct sections:
- Invalid_Character: Section 3.3 (non-alphabet characters)
- Invalid_Length: Section 6 (base32 block size requirements)
- Malformed_Input: Section 3.2 (padding)
- Fix test file section references to match correct sections
This ensures all RFC references are accurate and adds a link to the
source RFC for reference.
Add defer delete for encoded strings across all test procedures to ensure
proper cleanup and prevent memory leaks. This completes the memory
management improvements started in 591dd876.