diff options
Diffstat (limited to 'source/compiler/asloperands.c')
-rw-r--r-- | source/compiler/asloperands.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/source/compiler/asloperands.c b/source/compiler/asloperands.c index deb4bd4..4afbd96 100644 --- a/source/compiler/asloperands.c +++ b/source/compiler/asloperands.c @@ -971,12 +971,15 @@ OpnDoDefinitionBlock ( Gbl_TableId = AcpiOsAllocate (Length + 1); ACPI_STRCPY (Gbl_TableId, Child->Asl.Value.String); + /* + * Convert anything non-alphanumeric to an underscore. This + * allows us to use the TableID to generate unique C symbols. + */ for (i = 0; i < Length; i++) { - if (Gbl_TableId[i] == ' ') + if (!isalnum ((int) Gbl_TableId[i])) { - Gbl_TableId[i] = 0; - break; + Gbl_TableId[i] = '_'; } } } |