From 1d940d05b5105cbbcfa0c572927aec49499dc35f Mon Sep 17 00:00:00 2001 From: wuyizhong Date: Tue, 7 Nov 2006 03:03:06 +0000 Subject: 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 --- Tools/CCode/Source/Common/ParseInf.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'Tools/CCode/Source/Common/ParseInf.c') 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) -- cgit v1.2.3