aboutsummaryrefslogtreecommitdiff
path: root/source/compiler/aslparseop.c
diff options
context:
space:
mode:
Diffstat (limited to 'source/compiler/aslparseop.c')
-rw-r--r--source/compiler/aslparseop.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/source/compiler/aslparseop.c b/source/compiler/aslparseop.c
index b58d4e6623f2..46875413e439 100644
--- a/source/compiler/aslparseop.c
+++ b/source/compiler/aslparseop.c
@@ -743,13 +743,18 @@ TrCreateConstantLeafOp (
/* Get a copy of the current time */
+ Op->Asl.Value.String = "";
CurrentTime = time (NULL);
+
StaticTimeString = ctime (&CurrentTime);
- TimeString = UtLocalCalloc (strlen (StaticTimeString) + 1);
- strcpy (TimeString, StaticTimeString);
+ if (StaticTimeString)
+ {
+ TimeString = UtLocalCalloc (strlen (StaticTimeString) + 1);
+ strcpy (TimeString, StaticTimeString);
- TimeString[strlen(TimeString) -1] = 0; /* Remove trailing newline */
- Op->Asl.Value.String = TimeString;
+ TimeString[strlen(TimeString) -1] = 0; /* Remove trailing newline */
+ Op->Asl.Value.String = TimeString;
+ }
break;
default: /* This would be an internal error */