diff options
Diffstat (limited to 'Tools/CCode/Source/Common/ParseInf.c')
-rw-r--r-- | Tools/CCode/Source/Common/ParseInf.c | 10 |
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)
|