Skip to content

Commit 28f0f19

Browse files
committed
Code clean up
1 parent e4a8dc1 commit 28f0f19

File tree

1 file changed

+4
-4
lines changed
  • jsoniter-scala-core/src/main/scala/com/github/plokhotnyuk/jsoniter_scala/core

1 file changed

+4
-4
lines changed

jsoniter-scala-core/src/main/scala/com/github/plokhotnyuk/jsoniter_scala/core/JsonWriter.scala

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1888,9 +1888,9 @@ final class JsonWriter private[jsoniter_scala](
18881888
pos + 2
18891889
} else {
18901890
val lastPos = pos + len
1891-
val dotPos = pos + exp + 1
1891+
val beforeDotPos = pos + exp
18921892
writePositiveIntStartingFromLastPosition(dv, lastPos, buf, ds)
1893-
while (pos < dotPos) {
1893+
while (pos <= beforeDotPos) {
18941894
buf(pos) = buf(pos + 1)
18951895
pos += 1
18961896
}
@@ -2088,9 +2088,9 @@ final class JsonWriter private[jsoniter_scala](
20882088
pos + 2
20892089
} else {
20902090
val lastPos = pos + len
2091-
val dotPos = pos + exp + 1
2091+
val beforeDotPos = pos + exp
20922092
writeSmallPositiveLongStartingFromLastPosition(dv, lastPos, buf, ds)
2093-
while (pos < dotPos) {
2093+
while (pos <= beforeDotPos) {
20942094
buf(pos) = buf(pos + 1)
20952095
pos += 1
20962096
}

0 commit comments

Comments
 (0)