stringt.adb (Write_String_Table_Entry): Handle wide characters properly
authorRobert Dewar <dewar@adacore.com>
Tue, 8 Apr 2008 06:55:57 +0000 (08:55 +0200)
committerArnaud Charlet <charlet@gcc.gnu.org>
Tue, 8 Apr 2008 06:55:57 +0000 (08:55 +0200)
2008-04-08  Robert Dewar  <dewar@adacore.com>

* stringt.adb (Write_String_Table_Entry): Handle wide characters
properly

From-SVN: r134053

gcc/ada/stringt.adb

index 88b72e056dd11770c2e34b1fceb9f5aae288e8b2..6d69d1dcf024a0d5bbd4f07bbcafb1db5d9d29c2 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 B o d y                                  --
 --                                                                          --
---          Copyright (C) 1992-2007, Free Software Foundation, Inc.         --
+--          Copyright (C) 1992-2008, Free Software Foundation, Inc.         --
 --                                                                          --
 -- GNAT is free software;  you can  redistribute it  and/or modify it under --
 -- terms of the  GNU General Public License as published  by the Free Soft- --
@@ -428,9 +428,8 @@ package body Stringt is
          for J in 1 .. String_Length (Id) loop
             C := Get_String_Char (Id, J);
 
-            if Character'Val (C) = '"' then
+            if C = Character'Pos ('"') then
                Write_Str ("""""");
-
             else
                Write_Char_Code (C);
             end if;