diff options
Diffstat (limited to 'source/compiler/aslutils.c')
-rw-r--r-- | source/compiler/aslutils.c | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/source/compiler/aslutils.c b/source/compiler/aslutils.c index c5ff42c0156c..8b46d38bb532 100644 --- a/source/compiler/aslutils.c +++ b/source/compiler/aslutils.c @@ -1004,11 +1004,11 @@ UtAttachNamepathToOwner ( * * FUNCTION: UtDoConstant * - * PARAMETERS: String - Hexadecimal or decimal string + * PARAMETERS: String - Hex/Decimal/Octal * * RETURN: Converted Integer * - * DESCRIPTION: Convert a string to an integer, with error checking. + * DESCRIPTION: Convert a string to an integer, with overflow/error checking. * ******************************************************************************/ @@ -1017,17 +1017,20 @@ UtDoConstant ( char *String) { ACPI_STATUS Status; - UINT64 Converted; + UINT64 ConvertedInteger; char ErrBuf[64]; - Status = AcpiUtStrtoul64 (String, ACPI_STRTOUL_64BIT, &Converted); + Status = AcpiUtStrtoul64 (String, &ConvertedInteger); if (ACPI_FAILURE (Status)) { - sprintf (ErrBuf, "%s %s\n", "Conversion error:", + sprintf (ErrBuf, "While creating 64-bit constant: %s\n", AcpiFormatException (Status)); - AslCompilererror (ErrBuf); + + AslCommonError (ASL_ERROR, ASL_MSG_SYNTAX, Gbl_CurrentLineNumber, + Gbl_LogicalLineNumber, Gbl_CurrentLineOffset, + Gbl_CurrentColumn, Gbl_Files[ASL_FILE_INPUT].Filename, ErrBuf); } - return (Converted); + return (ConvertedInteger); } |