From 8cd9e4f3d4eba481b411482331293c8079ab24b2 Mon Sep 17 00:00:00 2001 From: Doug Zongker Date: Thu, 12 Aug 2010 17:38:09 -0700 Subject: fix bug in applying patches When restarting a patch from crashing in the middle of a large file, we're not finding the correct patch to apply to the copy saved in cache. Change-Id: I41cb2b87d096bb7a28a10c4cf3902facd45d4c9d --- applypatch/applypatch.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'applypatch') diff --git a/applypatch/applypatch.c b/applypatch/applypatch.c index 99d3661..5debaac 100644 --- a/applypatch/applypatch.c +++ b/applypatch/applypatch.c @@ -588,7 +588,7 @@ int applypatch(const char* source_filename, int to_use = FindMatchingPatch(copy_file.sha1, patch_sha1_str, num_patches); - if (to_use > 0) { + if (to_use >= 0) { copy_patch_value = patch_data[to_use]; } -- cgit v1.1