summaryrefslogtreecommitdiff
path: root/sal/inc
diff options
context:
space:
mode:
authorZolnai Tamás <zolnaitamas2000@gmail.com>2013-03-25 12:06:20 +0100
committerStephan Bergmann <sbergman@redhat.com>2013-03-25 17:33:29 +0100
commitbd60d41176da540b01d7583cfe00637431967f39 (patch)
tree8aae129fdb981229e3d48bea5adca1c113bae636 /sal/inc
parent476081b19bd71d5c1eb7d82eee4821f099ecde78 (diff)
Handle oveflow in O(U)String::toInt() functions
Return 0 when overflow. The base idea in unsigned case is checking wheather (Max-nDigit)/nRadix < n But for efficency, take out nDiv = Max/nRadix from loop and corrigate it with -1 if needed. In signed case use minimum value if the number is negativ. Change-Id: I5b77580adbf12421b6c4b785ba9bc2a080accba2 Signed-off-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'sal/inc')
0 files changed, 0 insertions, 0 deletions