* binutils-all/arm/thumb2-cond.s: Allow for tab expansion by the pty.
[deliverable/binutils-gdb.git] / binutils / rclex.l
index 4028405cd4032e52396fe8ea68ac79b35e25239d..92b1ec738526786bed9088739bed5e69bd682f10 100644 (file)
@@ -17,8 +17,8 @@
 
    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software
-   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-   02111-1307, USA.  */
+   Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
+   02110-1301, USA.  */
 
 /* This is a lex input file which generates a lexer used by the
    Windows rc file parser.  It basically just recognized a bunch of
@@ -308,6 +308,7 @@ handle_quotes (const char *input, unsigned long *len)
   char *ret, *s;
   const char *t;
   int ch;
+  int num_xdigits;
 
   ret = get_string (strlen (input) + 1);
 
@@ -389,7 +390,11 @@ handle_quotes (const char *input, unsigned long *len)
            case 'x':
              ++t;
              ch = 0;
-             while (1)
+             /* We only handle single byte chars here.  Make sure
+                we finish an escape sequence like "/xB0ABC" after
+                the first two digits.  */
+              num_xdigits = 2;
+             while (num_xdigits--)
                {
                  if (*t >= '0' && *t <= '9')
                    ch = (ch << 4) | (*t - '0');
This page took 0.023655 seconds and 4 git commands to generate.