]> git.sesse.net Git - vlc/commitdiff
src/extra/libc.c:
authorSigmund Augdal Helberg <sigmunau@videolan.org>
Mon, 9 Feb 2004 16:12:25 +0000 (16:12 +0000)
committerSigmund Augdal Helberg <sigmunau@videolan.org>
Mon, 9 Feb 2004 16:12:25 +0000 (16:12 +0000)
 * fixed a nasty bug in vlc_atoll.(closes #1763)

src/extras/libc.c

index fbb2c5f5213850f67f56102f9b31b274db11e598..cad26a92a567849a464f6507ab6bbd65e6dbedb9 100644 (file)
@@ -2,7 +2,7 @@
  * libc.c: Extra libc function for some systems.
  *****************************************************************************
  * Copyright (C) 2002 VideoLAN
- * $Id: libc.c,v 1.15 2004/01/09 19:21:58 gbazin Exp $
+ * $Id: libc.c,v 1.16 2004/02/09 16:12:25 sigmunau Exp $
  *
  * Authors: Jon Lech Johansen <jon-vl@nanocrew.net>
  *          Samuel Hocevar <sam@zoy.org>
@@ -225,7 +225,7 @@ int64_t vlc_atoll( const char *str )
 
     while( *str >= '0' && *str <= '9' )
     {
-        i_value = i_value * 10 + ( *str - '0' );
+        i_value = i_value * 10 + ( *str++ - '0' );
     }
 
     return i_value * sign;