PennMUSH Community

Changeset 1000

Show
Ignore:
Timestamp:
07/07/07 13:12:34 (1 year ago)
Author:
shawnw
Message:

shortalias() and fullalias() returned a NULL pointer instead of an empty string for objects without aliases.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • 1.8.2/branches/devel/src/utils.c

    r999 r1000  
    688688  ATTR *a = atr_get_noparent(it, "ALIAS"); 
    689689 
    690   if (!a) 
    691     return '\0'; 
     690  if (!a) { 
     691    n[0] = '\0'; 
     692    return n; 
     693  } 
    692694 
    693695  strncpy(n, atr_value(a), BUFFER_LEN - 1); 
     
    709711 
    710712  s = fullalias(it); 
    711   if (!(s && *s)) 
    712     return '\0'; 
     713  if (!(s && *s)) { 
     714    n[0] = '\0'; 
     715    return n; 
     716  } 
    713717 
    714718  strncpy(n, s, BUFFER_LEN - 1);