fix the HiiStrIdToImage sct failure, which is caused by wrong algorithm of finding right-most line break opportunity.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8446 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
eric_tian 2009-06-03 01:43:47 +00:00
parent 071b7221a5
commit 35c218d7e6
1 changed files with 9 additions and 2 deletions

View File

@ -1766,6 +1766,7 @@ HiiStringToImage (
// It forces a line break that ends this row.
//
Index++;
LineBreak = TRUE;
break;
}
@ -1842,6 +1843,12 @@ HiiStringToImage (
Index = Index1 + 1;
break;
}
//
// If don't find a line break opportunity from EndIndex to StartIndex,
// then jump out.
//
if (Index1 == RowInfo[RowIndex].StartIndex)
break;
}
}
//
@ -1968,9 +1975,9 @@ HiiStringToImage (
Index++;
RowIndex++;
if (Flags & EFI_HII_IGNORE_LINE_BREAK) {
if (!LineBreak) {
//
// If setting IGNORE_LINE_BREAK attribute, only render one line to image
// If there is not a mandatory line break or line break opportunity, only render one line to image
//
break;
}