mirror of https://github.com/CGAL/cgal
Check if a char is >0 before calling isdigit() because it asserts for negative numbers on windows.
This commit is contained in:
parent
d201bc7c96
commit
c76819d0a7
|
|
@ -276,8 +276,8 @@ std::istream& operator>>( std::istream& in, File_header_OFF& h) {
|
|||
while( i < max_keyword - 1 && in.get(c) && std::isalnum(c))
|
||||
keyword[i++] = c;
|
||||
keyword[i] = '\0';
|
||||
if ( i < 2 || (std::isdigit(keyword[0]) && keyword[0] != '4')
|
||||
|| std::isdigit(keyword[1])) {
|
||||
if ( i < 2 || (keyword[0] >= 0 && std::isdigit(keyword[0]) && keyword[0] != '4')
|
||||
|| (keyword[1] >= 0 && std::isdigit(keyword[1]))) {
|
||||
in.clear( std::ios::badbit);
|
||||
if ( h.verbose()) {
|
||||
std::cerr << " " << std::endl;
|
||||
|
|
@ -329,7 +329,7 @@ std::istream& operator>>( std::istream& in, File_header_OFF& h) {
|
|||
}
|
||||
}
|
||||
in >> skip_comment_OFF >> c;
|
||||
if ( std::isdigit(c)) {
|
||||
if (c >= 0 && std::isdigit(c)) {
|
||||
in.putback(c);
|
||||
int n;
|
||||
in >> n;
|
||||
|
|
|
|||
Loading…
Reference in New Issue