diff options
Diffstat (limited to 'src/ui/text.c')
-rw-r--r-- | src/ui/text.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/ui/text.c b/src/ui/text.c index 80d3634c..6aaf40f5 100644 --- a/src/ui/text.c +++ b/src/ui/text.c | |||
@@ -649,7 +649,7 @@ static iChar nextChar_(const char **chPos, const char *end) { | |||
649 | return 0; | 649 | return 0; |
650 | } | 650 | } |
651 | iChar ch; | 651 | iChar ch; |
652 | int len = decodeBytes_MultibyteChar(*chPos, end - *chPos, &ch); | 652 | int len = decodeBytes_MultibyteChar(*chPos, end, &ch); |
653 | if (len <= 0) { | 653 | if (len <= 0) { |
654 | (*chPos)++; /* skip it */ | 654 | (*chPos)++; /* skip it */ |
655 | return 0; | 655 | return 0; |
@@ -862,6 +862,7 @@ static iRect run_Font_(iFont *d, const iRunArgs *args) { | |||
862 | const enum iRunMode mode = args->mode; | 862 | const enum iRunMode mode = args->mode; |
863 | const char * lastWordEnd = args->text.start; | 863 | const char * lastWordEnd = args->text.start; |
864 | iAssert(args->xposLimit == 0 || isMeasuring_(mode)); | 864 | iAssert(args->xposLimit == 0 || isMeasuring_(mode)); |
865 | iAssert(args->text.end >= args->text.start); | ||
865 | if (args->continueFrom_out) { | 866 | if (args->continueFrom_out) { |
866 | *args->continueFrom_out = args->text.end; | 867 | *args->continueFrom_out = args->text.end; |
867 | } | 868 | } |