Branch: Tag:

1997-02-22

1997-02-22 20:03:58 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Added some argument checking to load_font().

Rev: server/modules/graphics/graphic_text.pike:1.23.2.3

1: - string cvs_version="$Id: graphic_text.pike,v 1.23.2.2 1997/02/15 15:46:58 grubba Exp $"; + string cvs_version="$Id: graphic_text.pike,v 1.23.2.3 1997/02/22 20:03:58 grubba Exp $";   #include <module.h>   inherit "module";   inherit "roxenlib";
130:   {    object fnt = Font();    -  if(sscanf(name, "%*s/%*s") != 2) +  if ((!name)||(name == "")) { +  name = QUERY(default_size)+"/"+QUERY(default_font); +  } else if(sscanf(name, "%*s/%*s") != 2) {    name=QUERY(default_size)+"/"+name; -  +  }       name = "fonts/" + name;