diff options
| author | Miquel Sabaté Solà <mikisabate@gmail.com> | 2025-09-02 16:43:05 +0200 |
|---|---|---|
| committer | Miquel Sabaté Solà <mikisabate@gmail.com> | 2025-09-02 16:43:05 +0200 |
| commit | f5f94d1967c18f986c6c0fe09f360044a5847970 (patch) | |
| tree | b3df9351223b158d149895fe6e35c32475816139 | |
| parent | 8e7993a63e32981757c4d65fe6519439dde97d8e (diff) | |
| download | tools.nes-f5f94d1967c18f986c6c0fe09f360044a5847970.tar.gz tools.nes-f5f94d1967c18f986c6c0fe09f360044a5847970.zip | |
parser: Avoid unwrap crash on weird quoted strings
Signed-off-by: Miquel Sabaté Solà <mikisabate@gmail.com>
| -rw-r--r-- | lib/xixanta/src/parser.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/xixanta/src/parser.rs b/lib/xixanta/src/parser.rs index a0d19d0..04f8959 100644 --- a/lib/xixanta/src/parser.rs +++ b/lib/xixanta/src/parser.rs @@ -1236,7 +1236,7 @@ impl Parser { return Ok(PNode { node_type: NodeType::Value, value: PString { - value: line.get(start..self.offset).unwrap().to_string(), + value: line.get(start..self.offset).unwrap_or("").to_string(), line: self.line, start: start_column, end: self.column, |
