[MPlayer-dev-eng] octal and hex surprise and perplex

Reimar Döffinger Reimar.Doeffinger at stud.uni-karlsruhe.de
Sun Jun 11 12:27:23 CEST 2006


Hi,
On Sun, Jun 11, 2006 at 12:21:49PM +0200, Reimar D?ffinger wrote:
> Hmmm... so how about the even weirder way:
> strtol(..., 10)
> and
> strtol(..., 0)
> as fallback?

i.e. as attached.

Greetings,
Reimar Döffinger
-------------- next part --------------
Index: m_option.c
===================================================================
--- m_option.c	(revision 18677)
+++ m_option.c	(working copy)
@@ -143,6 +143,8 @@
   if (param == NULL)
     return M_OPT_MISSING_PARAM;
 
+  tmp_int = strtol(param, &endptr, 10);
+  if (*endptr)
   tmp_int = strtol(param, &endptr, 0);
   if (*endptr) {
     mp_msg(MSGT_CFGPARSER, MSGL_ERR, "The %s option must be an integer: %s\n",name, param);


More information about the MPlayer-dev-eng mailing list