瀏覽代碼

Fix omission from https://trac.osgeo.org/grass/changeset/40739

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@40742 15284696-431f-4ddb-bdfa-cd5b030d7da7
Glynn Clements 15 年之前
父節點
當前提交
597dc04bc1
共有 1 個文件被更改,包括 4 次插入3 次删除
  1. 4 3
      ps/ps.map/ps_fclrtbl.c

+ 4 - 3
ps/ps.map/ps_fclrtbl.c

@@ -22,7 +22,7 @@
 
 int PS_fcolortable(void)
 {
-    char buf[512], *ch, units[GNAME_MAX];
+    char buf[512], *ch, *units;
     int i, k;
     int R, G, B;
     DCELL dmin, dmax, val;
@@ -249,8 +249,9 @@ int PS_fcolortable(void)
 
 
     /* print units label, if present */
-    if (Rast_read_units(ct.name, ct.mapset, units) != 0)
-        units[0] = '\0';
+    units = Rast_read_units(ct.name, ct.mapset);
+    if (!units)
+        units = "";
 
     if(strlen(units)) {
 	margin = 0.2 * fontsize;