shithub: snippets

Download patch

ref: f5ad0ff02ba05f2f5e0926b85668968fbebeb721
parent: 53712a22e4b67d805c888a08f4586067c047bf62
author: Sigrid Solveig Haflínudóttir <ftrvxmtrx@gmail.com>
date: Sat Jan 16 20:51:26 EST 2021

xml: fix off-by-one

--- a/xml.c
+++ b/xml.c
@@ -50,7 +50,7 @@
 				for(i = 0; i < nelem(escmap); i++){
 					if(strncmp(s, &escmap[i][2], escmap[i][0]) == 0){
 						*o++ = escmap[i][1];
-						s += escmap[i][0] - 1;
+						s += escmap[i][0];
 						goto next;
 					}
 				}