summaryrefslogtreecommitdiff
path: root/Tools/CCode/Source/Common/ParseInf.c
diff options
context:
space:
mode:
authorwuyizhong <wuyizhong@6f19259b-4bc3-4df7-8a09-765794883524>2006-11-07 03:03:06 +0000
committerwuyizhong <wuyizhong@6f19259b-4bc3-4df7-8a09-765794883524>2006-11-07 03:03:06 +0000
commit1d940d05b5105cbbcfa0c572927aec49499dc35f (patch)
tree3bf87ef6d5699fd1cd80a83c8343ba6d04899f4d /Tools/CCode/Source/Common/ParseInf.c
parentb51f14f4d6ab20a6ad5de08bd001c44ad59dea18 (diff)
downloadedk2-platforms-1d940d05b5105cbbcfa0c572927aec49499dc35f.tar.xz
Update ParseInf to resolve different line separator between WINDOWS and LINUX (\r\n vs. \n). Update GenFvImage to resolve different file separator between WINDOWS and LINUX (\ vs. /). Add variable initialize for SymImageSize.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1908 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'Tools/CCode/Source/Common/ParseInf.c')
-rw-r--r--Tools/CCode/Source/Common/ParseInf.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/Tools/CCode/Source/Common/ParseInf.c b/Tools/CCode/Source/Common/ParseInf.c
index de0ffd85c7..6f5900e897 100644
--- a/Tools/CCode/Source/Common/ParseInf.c
+++ b/Tools/CCode/Source/Common/ParseInf.c
@@ -116,7 +116,15 @@ Returns:
//
// Add the null termination over the 0x0D
//
- InputBuffer[CharsToCopy - 1] = '\0';
+ if (InputBuffer[CharsToCopy - 1] == '\r') {
+
+ InputBuffer[CharsToCopy - 1] = '\0';
+
+ } else {
+
+ InputBuffer[CharsToCopy] = '\0';
+
+ }
//
// Increment the current file pointer (include the 0x0A)