Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Json parsing crashes when trying to read 🌶️ #2803

Closed
JamesDSource opened this issue Sep 18, 2023 · 0 comments · Fixed by #2804
Closed

Json parsing crashes when trying to read 🌶️ #2803

JamesDSource opened this issue Sep 18, 2023 · 0 comments · Fixed by #2804

Comments

@JamesDSource
Copy link

Context

Odin: dev-2023-09:f9657982
OS: openSUSE Tumbleweed, Linux 6.3.9-1-default
CPU: AMD Ryzen 7 5800X 8-Core Processor
RAM: 31979 MiB

When trying to parse or unmarshal json with this emoji in particular: 🌶️ , Odin gives the error "Odin/core/encoding/json/parser.odin(357:16) Invalid slice indices 0:8 is out of range 0..<7". As far as I can tell, all other emojis I have tried work fine.

Steps to Reproduce

Just run this

package main

import "core:encoding/json"
import "core:fmt"

main :: proc() {
data, err := json.parse_string({"value":"🌶️"})
fmt.println(data.(json.Object)["value"])
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant