summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDov Grobgeld <dov.grobgeld@gmail.com>2016-01-30 21:38:27 +0200
committerDov Grobgeld <dov.grobgeld@gmail.com>2016-01-30 22:41:21 +0200
commit63d6ba7e9b479eee7d10ff03e43c293b11298e72 (patch)
tree921f17350090b5f58c88b12d06150b6d990e3ea1
parent56e5f121de14af07df9862a823201f3435a38a81 (diff)
downloadfribidi-63d6ba7e9b479eee7d10ff03e43c293b11298e72.tar.gz
Fixed all remaining BidiTest.txt bugs.
- The level was not assigned when in isolate override. - Did not ignore pushing the stack when in isolate override. - PDI's did not reset the overpushed level.
-rw-r--r--lib/fribidi-bidi.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/fribidi-bidi.c b/lib/fribidi-bidi.c
index 9bf14b6..0076a64 100644
--- a/lib/fribidi-bidi.c
+++ b/lib/fribidi-bidi.c
@@ -281,6 +281,7 @@ print_bidi_string (
#define PUSH_STATUS \
FRIBIDI_BEGIN_STMT \
if LIKELY(over_pushed == 0 \
+ && isolate_overflow == 0 \
&& new_level <= FRIBIDI_BIDI_MAX_EXPLICIT_LEVEL) \
{ \
if UNLIKELY(level == FRIBIDI_BIDI_MAX_EXPLICIT_LEVEL - 1) \
@@ -539,7 +540,11 @@ fribidi_get_par_embedding_levels (
for (i = RL_LEN (pp); i; i--)
{
if (isolate_overflow > 0)
- isolate_overflow--;
+ {
+ isolate_overflow--;
+ RL_LEVEL (pp) = level;
+ }
+
else if (valid_isolate_count > 0)
{
/* Pop away all LRE,RLE,LRO, RLO levels
@@ -547,6 +552,7 @@ fribidi_get_par_embedding_levels (
terminated by the PDI */
while (stack_size && !status_stack[stack_size-1].isolate)
POP_STATUS;
+ over_pushed = 0; /* The PDI resets the overpushed! */
POP_STATUS;
isolate_level-- ;
valid_isolate_count--;