From 93759a456daf00b34a7b46785e08e81c773eccc5 Mon Sep 17 00:00:00 2001 From: Michael Matz Date: Tue, 5 Feb 2008 14:06:26 +0000 Subject: [PATCH] Bah, we have to handle the empty string too. Whenever there were empty strings (STRID_EMPTY), e.g. in s->vendor, the SOLV file was fairly messed up in subtle ways. This might fix #354404 (at least with this I can't reproduce it). Probably most SOLV files need to be regenerated. --- tools/repo_write.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/repo_write.c b/tools/repo_write.c index e0db955..86b95f3 100644 --- a/tools/repo_write.c +++ b/tools/repo_write.c @@ -1245,7 +1245,7 @@ if (cbdata.dirused) int same; size_t len; for (same = 0; same < 255; same++) - if (old_str[same] != str[same]) + if (!old_str[same] || !str[same] || old_str[same] != str[same]) break; *pp++ = same; len = strlen (str + same) + 1; -- 2.7.4