diff options
author | rsun3 <rsun3@6f19259b-4bc3-4df7-8a09-765794883524> | 2010-05-17 08:32:05 +0000 |
---|---|---|
committer | rsun3 <rsun3@6f19259b-4bc3-4df7-8a09-765794883524> | 2010-05-17 08:32:05 +0000 |
commit | f0c855b26386c16ba0a70600d72cd09c090db0e0 (patch) | |
tree | 14527b04cad3e48d713e7577f02a595eb7b1b1b2 /MdeModulePkg/Universal/Console/TerminalDxe | |
parent | 0e4483bc69aa31f1facbe62af438fa4feaf4503a (diff) | |
download | edk2-platforms-f0c855b26386c16ba0a70600d72cd09c090db0e0.tar.xz |
Small code refinement in MdeModulePkg.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10492 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Universal/Console/TerminalDxe')
-rw-r--r-- | MdeModulePkg/Universal/Console/TerminalDxe/Vtutf8.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/MdeModulePkg/Universal/Console/TerminalDxe/Vtutf8.c b/MdeModulePkg/Universal/Console/TerminalDxe/Vtutf8.c index 51cc093a41..26fc13147a 100644 --- a/MdeModulePkg/Universal/Console/TerminalDxe/Vtutf8.c +++ b/MdeModulePkg/Universal/Console/TerminalDxe/Vtutf8.c @@ -1,7 +1,7 @@ /** @file
Implementation of translation upon VT-UTF8.
-Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -145,10 +145,11 @@ GetOneValidUtf8Char ( // three-byte utf8 char go on
//
if ((Temp & 0xc0) == 0x80) {
-
- Utf8Char->Utf8_3[2 - Index] = Temp;
- Index++;
- if (Index > 2) {
+ if (Index == 1) {
+ Utf8Char->Utf8_3[1] = Temp;
+ Index++;
+ } else {
+ Utf8Char->Utf8_3[0] = Temp;
FetchFlag = FALSE;
}
} else {
|