summaryrefslogtreecommitdiff
path: root/src/util.cc
diff options
context:
space:
mode:
authorBardur Arantsson <bardur@scientician.net>2014-06-26 21:54:30 +0200
committerBardur Arantsson <bardur@scientician.net>2014-06-27 07:42:41 +0200
commitf50ed5b5c1e3caa38a5409cc22ea53fefd5c1209 (patch)
tree827ac3d7301849f2608dba0c1465d65137fffd94 /src/util.cc
parent143808187704f8feec1b71f4e1c9a4b7efb1d9d6 (diff)
Remove most of z-virt.[ch]
This commit leaves only safe_calloc() as a convenient "non-failing" calloc().
Diffstat (limited to 'src/util.cc')
-rw-r--r--src/util.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/util.cc b/src/util.cc
index 9714b374..ce2d5ef0 100644
--- a/src/util.cc
+++ b/src/util.cc
@@ -1408,7 +1408,7 @@ errr macro_add(cptr pat, cptr act)
if (n >= 0)
{
/* Free the old macro action */
- string_free(macro__act[n]);
+ free(macro__act[n]);
}
/* Create a new macro */
@@ -1418,11 +1418,11 @@ errr macro_add(cptr pat, cptr act)
n = macro__num++;
/* Save the pattern */
- macro__pat[n] = string_make(pat);
+ macro__pat[n] = strdup(pat);
}
/* Save the action */
- macro__act[n] = string_make(act);
+ macro__act[n] = strdup(act);
/* Efficiency */
macro__use[(byte)(pat[0])] = TRUE;