mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-11-12 13:52:55 +01:00
fixed an off by 0 error (yeah, the function went off when the while (n--)
Sat Jul 15 09:14:35 2000 Tim Janik <timj@gtk.org> * gstrfuncs.c (g_strncasecmp): fixed an off by 0 error (yeah, the function went off when the while (n--) loop failed due to n==0 ;), reported by Jean-Louis HAMEL <jlhamel@club-internet.fr>.
This commit is contained in:
@@ -1,3 +1,9 @@
|
|||||||
|
Sat Jul 15 09:14:35 2000 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
|
* gstrfuncs.c (g_strncasecmp): fixed an off by 0 error (yeah,
|
||||||
|
the function went off when the while (n--) loop failed due to
|
||||||
|
n==0 ;), reported by Jean-Louis HAMEL <jlhamel@club-internet.fr>.
|
||||||
|
|
||||||
2000-05-31 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
|
2000-05-31 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
|
||||||
|
|
||||||
* gutils.c (g_get_any_init): Use sysconf (_SC_GETPW_R_SIZE_MAX)
|
* gutils.c (g_get_any_init): Use sysconf (_SC_GETPW_R_SIZE_MAX)
|
||||||
|
|||||||
@@ -1,3 +1,9 @@
|
|||||||
|
Sat Jul 15 09:14:35 2000 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
|
* gstrfuncs.c (g_strncasecmp): fixed an off by 0 error (yeah,
|
||||||
|
the function went off when the while (n--) loop failed due to
|
||||||
|
n==0 ;), reported by Jean-Louis HAMEL <jlhamel@club-internet.fr>.
|
||||||
|
|
||||||
2000-05-31 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
|
2000-05-31 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
|
||||||
|
|
||||||
* gutils.c (g_get_any_init): Use sysconf (_SC_GETPW_R_SIZE_MAX)
|
* gutils.c (g_get_any_init): Use sysconf (_SC_GETPW_R_SIZE_MAX)
|
||||||
|
|||||||
@@ -1,3 +1,9 @@
|
|||||||
|
Sat Jul 15 09:14:35 2000 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
|
* gstrfuncs.c (g_strncasecmp): fixed an off by 0 error (yeah,
|
||||||
|
the function went off when the while (n--) loop failed due to
|
||||||
|
n==0 ;), reported by Jean-Louis HAMEL <jlhamel@club-internet.fr>.
|
||||||
|
|
||||||
2000-05-31 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
|
2000-05-31 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
|
||||||
|
|
||||||
* gutils.c (g_get_any_init): Use sysconf (_SC_GETPW_R_SIZE_MAX)
|
* gutils.c (g_get_any_init): Use sysconf (_SC_GETPW_R_SIZE_MAX)
|
||||||
|
|||||||
@@ -1,3 +1,9 @@
|
|||||||
|
Sat Jul 15 09:14:35 2000 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
|
* gstrfuncs.c (g_strncasecmp): fixed an off by 0 error (yeah,
|
||||||
|
the function went off when the while (n--) loop failed due to
|
||||||
|
n==0 ;), reported by Jean-Louis HAMEL <jlhamel@club-internet.fr>.
|
||||||
|
|
||||||
2000-05-31 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
|
2000-05-31 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
|
||||||
|
|
||||||
* gutils.c (g_get_any_init): Use sysconf (_SC_GETPW_R_SIZE_MAX)
|
* gutils.c (g_get_any_init): Use sysconf (_SC_GETPW_R_SIZE_MAX)
|
||||||
|
|||||||
@@ -1,3 +1,9 @@
|
|||||||
|
Sat Jul 15 09:14:35 2000 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
|
* gstrfuncs.c (g_strncasecmp): fixed an off by 0 error (yeah,
|
||||||
|
the function went off when the while (n--) loop failed due to
|
||||||
|
n==0 ;), reported by Jean-Louis HAMEL <jlhamel@club-internet.fr>.
|
||||||
|
|
||||||
2000-05-31 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
|
2000-05-31 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
|
||||||
|
|
||||||
* gutils.c (g_get_any_init): Use sysconf (_SC_GETPW_R_SIZE_MAX)
|
* gutils.c (g_get_any_init): Use sysconf (_SC_GETPW_R_SIZE_MAX)
|
||||||
|
|||||||
@@ -1,3 +1,9 @@
|
|||||||
|
Sat Jul 15 09:14:35 2000 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
|
* gstrfuncs.c (g_strncasecmp): fixed an off by 0 error (yeah,
|
||||||
|
the function went off when the while (n--) loop failed due to
|
||||||
|
n==0 ;), reported by Jean-Louis HAMEL <jlhamel@club-internet.fr>.
|
||||||
|
|
||||||
2000-05-31 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
|
2000-05-31 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
|
||||||
|
|
||||||
* gutils.c (g_get_any_init): Use sysconf (_SC_GETPW_R_SIZE_MAX)
|
* gutils.c (g_get_any_init): Use sysconf (_SC_GETPW_R_SIZE_MAX)
|
||||||
|
|||||||
@@ -1,3 +1,9 @@
|
|||||||
|
Sat Jul 15 09:14:35 2000 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
|
* gstrfuncs.c (g_strncasecmp): fixed an off by 0 error (yeah,
|
||||||
|
the function went off when the while (n--) loop failed due to
|
||||||
|
n==0 ;), reported by Jean-Louis HAMEL <jlhamel@club-internet.fr>.
|
||||||
|
|
||||||
2000-05-31 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
|
2000-05-31 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
|
||||||
|
|
||||||
* gutils.c (g_get_any_init): Use sysconf (_SC_GETPW_R_SIZE_MAX)
|
* gutils.c (g_get_any_init): Use sysconf (_SC_GETPW_R_SIZE_MAX)
|
||||||
|
|||||||
@@ -1,3 +1,9 @@
|
|||||||
|
Sat Jul 15 09:14:35 2000 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
|
* gstrfuncs.c (g_strncasecmp): fixed an off by 0 error (yeah,
|
||||||
|
the function went off when the while (n--) loop failed due to
|
||||||
|
n==0 ;), reported by Jean-Louis HAMEL <jlhamel@club-internet.fr>.
|
||||||
|
|
||||||
2000-05-31 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
|
2000-05-31 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
|
||||||
|
|
||||||
* gutils.c (g_get_any_init): Use sysconf (_SC_GETPW_R_SIZE_MAX)
|
* gutils.c (g_get_any_init): Use sysconf (_SC_GETPW_R_SIZE_MAX)
|
||||||
|
|||||||
@@ -1029,8 +1029,9 @@ g_strncasecmp (const gchar *s1,
|
|||||||
g_return_val_if_fail (s1 != NULL, 0);
|
g_return_val_if_fail (s1 != NULL, 0);
|
||||||
g_return_val_if_fail (s2 != NULL, 0);
|
g_return_val_if_fail (s2 != NULL, 0);
|
||||||
|
|
||||||
while (n-- && *s1 && *s2)
|
while (n && *s1 && *s2)
|
||||||
{
|
{
|
||||||
|
n -= 1;
|
||||||
/* According to A. Cox, some platforms have islower's that
|
/* According to A. Cox, some platforms have islower's that
|
||||||
* don't work right on non-uppercase
|
* don't work right on non-uppercase
|
||||||
*/
|
*/
|
||||||
@@ -1042,7 +1043,7 @@ g_strncasecmp (const gchar *s1,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (n)
|
if (n)
|
||||||
return (((gint)(guchar) *s1) - ((gint)(guchar) *s2));
|
return (((gint) (guchar) *s1) - ((gint) (guchar) *s2));
|
||||||
else
|
else
|
||||||
return 0;
|
return 0;
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -1029,8 +1029,9 @@ g_strncasecmp (const gchar *s1,
|
|||||||
g_return_val_if_fail (s1 != NULL, 0);
|
g_return_val_if_fail (s1 != NULL, 0);
|
||||||
g_return_val_if_fail (s2 != NULL, 0);
|
g_return_val_if_fail (s2 != NULL, 0);
|
||||||
|
|
||||||
while (n-- && *s1 && *s2)
|
while (n && *s1 && *s2)
|
||||||
{
|
{
|
||||||
|
n -= 1;
|
||||||
/* According to A. Cox, some platforms have islower's that
|
/* According to A. Cox, some platforms have islower's that
|
||||||
* don't work right on non-uppercase
|
* don't work right on non-uppercase
|
||||||
*/
|
*/
|
||||||
@@ -1042,7 +1043,7 @@ g_strncasecmp (const gchar *s1,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (n)
|
if (n)
|
||||||
return (((gint)(guchar) *s1) - ((gint)(guchar) *s2));
|
return (((gint) (guchar) *s1) - ((gint) (guchar) *s2));
|
||||||
else
|
else
|
||||||
return 0;
|
return 0;
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user