diff options
Diffstat (limited to 'src/pugixml.cpp')
-rw-r--r-- | src/pugixml.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/pugixml.cpp b/src/pugixml.cpp index cac51a5..d379a23 100644 --- a/src/pugixml.cpp +++ b/src/pugixml.cpp @@ -4521,7 +4521,14 @@ PUGI__NS_BEGIN } if (negative) + { + // Workaround for crayc++ CC-3059: Expected no overflow in routine. + #ifdef _CRAYC + return (overflow || result > minneg) ? ~minneg + 1 : ~result + 1; + #else return (overflow || result > minneg) ? 0 - minneg : 0 - result; + #endif + } else return (overflow || result > maxpos) ? maxpos : result; } |