shithub: libtags

Download patch

ref: 55726cd44bdf8ab361ba4caee05107ab6f4ea430
parent: ce2aea9ae182d2c41a11b77e3d23afa11bb2f25b
author: Sigrid Solveig Haflínudóttir <[email protected]>
date: Mon May 3 14:55:41 EDT 2021

do not set tag bit in ctx.found unless the value is non-empty

--- a/tags.c
+++ b/tags.c
@@ -48,12 +48,13 @@
 			e--;
 		*e = 0;
 	}
-	if(type != Tunknown){
-		ctx->found |= 1<<type;
-		ctx->num++;
-	}
-	if(*s)
+	if(*s){
 		ctx->tag(ctx, type, k, s, offset, size, f);
+		if(type != Tunknown){
+			ctx->found |= 1<<type;
+			ctx->num++;
+		}
+	}
 }
 
 int