/* This file is part of the YAZ toolkit.
- * Copyright (C) 1995-2009 Index Data
+ * Copyright (C) 1995-2010 Index Data
* See the file LICENSE for details.
*/
if (!p)
return 0;
- for (argc = 0; *p ; argc++)
+ for (argc = 0; *p && argc < num ; argc++)
{
if (*p == '#') /* trailing comment */
break;