fktn-k / fkYAML

A C++ header-only YAML library
MIT License
67 stars 7 forks source link

Comment crashes parser #272

Closed acfsmith closed 7 months ago

acfsmith commented 7 months ago

Description

This YAML file crashes deserializer:

test:
  # comment
  - item: 123

Reproduction steps

std::ifstream ifs("test.yaml");
fkyaml::node root = fkyaml::node::deserialize(ifs);

Expected vs. actual results

The YAML file is valid according to the YAML validator. The parser shouldn't crash on it.

Minimal code example

No response

Error messages

No response

Compiler and operating system

Linux, clang version 16.0.6

Library version

0.3.1

Validation

fktn-k commented 7 months ago

@acfsmith
Thanks for your report! I'll take a look.

fktn-k commented 7 months ago

@acfsmith
I've fixed the crash in the PR #273.
Can you confirm if the issue is resolved on your environment in the develop branch?

acfsmith commented 7 months ago

I have checked the latest version. It doesn't crash anymore. Thank you very much!

fktn-k commented 7 months ago

@acfsmith
Thanks for your quick confirmation!
I'll close this issue then.