Skip to content

Commit

Permalink
Fix handling negative indexes in @indent.
Browse files Browse the repository at this point in the history
  • Loading branch information
bacek committed Jan 30, 2011
1 parent ab3071b commit 99576e1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/YAML/Tiny.pm
Expand Up @@ -280,7 +280,7 @@ method _read_array(@array, @indent, @lines) {
pir::die("YAML::Tiny failed to classify line '{ @lines[0] }'");
}
}
elsif pir::defined(@indent[-2]) && @indent[-1] == @indent[-2] {
elsif (@indent > 1) && (@indent[-1] == @indent[-2]) {
# This is probably a structure like the following...
# ---
# foo:
Expand Down

0 comments on commit 99576e1

Please sign in to comment.