Browse code

xcap_server: rever use of STR_VTOZ macro

- got it by picking a commit with another fix and this macro is not in
branch 5.3

Daniel-Constantin Mierla authored on 10/09/2020 08:31:30
Showing 1 changed files
... ...
@@ -321,12 +321,13 @@ int xcaps_xpath_hack(str *buf, int type)
321 321
 	}
322 322
 
323 323
 	start = buf->s;
324
-	STR_VTOZ(buf->s[buf->len-1], c);
324
+	c = buf->s[buf->len-1];
325
+	buf->s[buf->len-1] = '\0';
325 326
 	while((start < buf->s + buf->len - 8) && (p = strstr(start, match))!=NULL) {
326 327
 		memcpy(p, repl, 7);
327 328
 		start = p + 7;
328 329
 	}
329
-	STR_ZTOV(buf->s[buf->len-1], c);
330
+	buf->s[buf->len-1] = c;
330 331
 	return 0;
331 332
 }
332 333