NativeScript / nativescript-intl

Apache License 2.0
7 stars 8 forks source link

fix: Index for leading delimiters can get out of bounds if conditions are true for all elements #26

Closed CatchABus closed 2 years ago

CatchABus commented 3 years ago

The while loop for leading delimiters is quite dangerous, as it can lead to index being out of bounds. We should make sure index increment does not exceed array length.