diff options
Diffstat (limited to 'src/ortho')
-rw-r--r-- | src/ortho/mcode/ortho_ident.adb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/ortho/mcode/ortho_ident.adb b/src/ortho/mcode/ortho_ident.adb index 9b5a36ed0..c3990320d 100644 --- a/src/ortho/mcode/ortho_ident.adb +++ b/src/ortho/mcode/ortho_ident.adb @@ -37,9 +37,12 @@ package body Ortho_Ident is begin Start := Strs.Allocate (Str'Length + 1); for I in Str'Range loop + -- Identifiers are NULL terminated, so they cannot have any + -- embedded NULL. + pragma Assert (Str (I) /= ASCII.NUL); Strs.Table (Start + I - Str'First) := Str (I); end loop; - Strs.Table (Start + Str'Length) := ASCII.Nul; + Strs.Table (Start + Str'Length) := ASCII.NUL; Ids.Append (Start); return Ids.Last; end Get_Identifier; |