Index: trunk/Ohana/src/opihi/cmd.basic/strsub.c
===================================================================
--- trunk/Ohana/src/opihi/cmd.basic/strsub.c	(revision 16168)
+++ trunk/Ohana/src/opihi/cmd.basic/strsub.c	(revision 16214)
@@ -42,9 +42,9 @@
   while (*p && ((q = strstr (p, key)) != NULL)) {
     output = opihi_append (output, &Noutput, p, q);
-    output = opihi_append (output, &Noutput, value, strlen(value));
+    output = opihi_append (output, &Noutput, value, value + strlen(value));
     p = q + Nkey;
   }
   if (*p) {
-    output = opihi_append (output, &Noutput, p, strlen(p));
+    output = opihi_append (output, &Noutput, p, p + strlen(p));
   }
   
