[PATCH] windres: (10) The digits A-F are interpreted as 0-5 (Bernd Herd)

Gunnar Degnbol degnbol@danbbs.dk
Tue Mar 19 12:54:00 GMT 2002


This was posted by Bernd Herd in february as part of a large
patch bundling several fixes:
http://sources.redhat.com/ml/binutils/2002-02/msg00021.html

ChangeLog:

2002-03-19 Bernd Herd <info@herdsoft.com>

	* rclex.l: "\xhex" encoding in strings corrected

escapex.rc:

101 DIALOG DISCARDABLE  0, 0, 186, 95
BEGIN
     LTEXT "\xB0",-1,23,46,28,8
END

Before patch:

$ /bin/windres -i escapex.rc
LANGUAGE 0, 0

101 DIALOG MOVEABLE DISCARDABLE 0, 0, 186, 95
STYLE 0x80880000
BEGIN
   LTEXT "\020", 65535, 23, 46, 28, 8, 0x50020000
END

After patch:

$ /usr/local/bin/windres -i escapex.rc
LANGUAGE 9, 1

101 DIALOG MOVEABLE DISCARDABLE 0, 0, 186, 95
STYLE 0x80880000
BEGIN
   LTEXT "\260", 65535, 23, 46, 28, 8, 0x50020000
END

escapex.patch
--- binutils/rclex.l	Sun Mar 17 14:53:32 2002
+++ binutils.new/rclex.l	Sun Mar 17 14:53:37 2002
@@ -394,9 +394,9 @@
  		  if (*t >= '0' && *t <= '9')
  		    ch = (ch << 4) | (*t - '0');
  		  else if (*t >= 'a' && *t <= 'f')
- 
	    ch = (ch << 4) | (*t - 'a');
+ 
	    ch = (ch << 4) | (*t - 'a' + 10);
  		  else if (*t >= 'A' && *t <= 'F')
- 
	    ch = (ch << 4) | (*t - 'A');
+ 
	    ch = (ch << 4) | (*t - 'A' + 10);
  		  else
  		    break;
  		  ++t;




More information about the Binutils mailing list