File tree Expand file tree Collapse file tree 1 file changed +16
-22
lines changed
jsoniter-scala-core/js/src/main/scala/com/github/plokhotnyuk/jsoniter_scala/core Expand file tree Collapse file tree 1 file changed +16
-22
lines changed Original file line number Diff line number Diff line change @@ -1980,14 +1980,12 @@ final class JsonWriter private[jsoniter_scala](
19801980 var q0 = x
19811981 if (x < 0 ) {
19821982 q0 = - q0
1983- if (q0 != x) {
1984- buf(pos) = '-'
1985- pos += 1
1986- } else {
1983+ buf(pos) = '-'
1984+ pos += 1
1985+ if (q0 == x) {
19871986 q0 = 147483648
1988- buf(pos) = '-'
1989- buf(pos + 1 ) = '2'
1990- pos += 2
1987+ buf(pos) = '2'
1988+ pos += 1
19911989 }
19921990 }
19931991 pos += digitCount(q0)
@@ -2249,14 +2247,12 @@ final class JsonWriter private[jsoniter_scala](
22492247 var q0 = x
22502248 if (x < 0 ) {
22512249 q0 = - q0
2252- if (q0 != x) {
2253- buf(pos) = '-'
2254- pos += 1
2255- } else {
2250+ buf(pos) = '-'
2251+ pos += 1
2252+ if (q0 == x) {
22562253 q0 = 147483648
2257- buf(pos) = '-'
2258- buf(pos + 1 ) = '2'
2259- pos += 2
2254+ buf(pos) = '2'
2255+ pos += 1
22602256 }
22612257 }
22622258 pos += digitCount(q0)
@@ -2273,16 +2269,14 @@ final class JsonWriter private[jsoniter_scala](
22732269 var q0 = x
22742270 if (x < 0 ) {
22752271 q0 = - q0
2276- if (q0 != x) {
2277- buf(pos) = '-'
2278- pos += 1
2279- } else {
2272+ buf(pos) = '-'
2273+ pos += 1
2274+ if (q0 == x) {
22802275 q0 = 3372036854775808L
2281- buf(pos) = '- '
2282- buf(pos + 1 ) = '9 '
2276+ buf(pos) = '9 '
2277+ buf(pos + 1 ) = '2 '
22832278 buf(pos + 2 ) = '2'
2284- buf(pos + 3 ) = '2'
2285- pos += 4
2279+ pos += 3
22862280 }
22872281 }
22882282 var q = q0.toInt
You can’t perform that action at this time.
0 commit comments