Sync(13): libs/unicode/string.c

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

Eek! someone moved string.c! Patch updated accordingly...

Cheers,
Jon

License: X11

ChangeLog:

  Jon Griffiths <jon_p_griffiths@yahoo.com>

  +libs/unicode/string.c
   vsnprintfW: %% should output a literal % sign.


=====
"Don't wait for the seas to part, or messiahs to come;
 Don't you sit around and waste this chance..." - Live

jon_p_griffiths@yahoo.com

__________________________________
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com
--- wine/libs/unicode/string.c	Fri Mar 21 05:06:51 2003
+++ wine-develop/libs/unicode/string.c	Tue Apr 29 12:06:40 2003
@@ -160,7 +160,7 @@
 
 noconv:
   /* We must handle a special case here: the base is 0 or 16 and the
-     first two characters are '0' and 'x', but the rest are no
+     first two characters are '0' and 'x', but the rest are not
      hexadecimal digits.  This is no error case.  We return 0 and
      ENDPTR points to the `x`.  */
   if (endptr != NULL)
@@ -272,7 +272,7 @@
 
 noconv:
   /* We must handle a special case here: the base is 0 or 16 and the
-     first two characters are '0' and 'x', but the rest are no
+     first two characters are '0' and 'x', but the rest are not
      hexadecimal digits.  This is no error case.  We return 0 and
      ENDPTR points to the `x`.  */
   if (endptr != NULL)
@@ -303,7 +303,14 @@
                 return -1;
             *str++ = *iter++;
         }
-        if (*iter == '%')
+        if (*iter == '%' && iter[1] == '%')
+        {
+           if (written++ >= len)
+             return -1;
+           *str++ = '%'; /* "%%"->'%' */
+           iter+= 2;
+        }
+        else if (*iter == '%')
         {
             fmta = fmtbufa;
             *fmta++ = *iter++;

[Index of Archives]     [Gimp for Windows]     [Red Hat]     [Samba]     [Yosemite Camping]     [Graphics Cards]     [Wine Home]

  Powered by Linux