Skip to content

Commit ae53c4e

Browse files
authored
Avoid inverting not_a_offset, which is minutes::min() i.e. min of long (#390)
With two's complement you can't invert the min value with `-`
1 parent 0496e35 commit ae53c4e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/parse.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -873,7 +873,7 @@ from_stream(std::basic_istream<CharT, Traits>& is,
873873
}
874874
}
875875
}
876-
if (neg)
876+
if (neg && !is.fail())
877877
toff = -toff;
878878
checked_set(temp_offset, toff, not_a_offset, is);
879879
command = nullptr;

0 commit comments

Comments
 (0)