Skip to content

Commit

Permalink
Fix a reference counting issue that broke update notifications in 201…
Browse files Browse the repository at this point in the history
…4-01-03.

Luckily, this is thcrap and there is still the possibility for nifty workarounds to deal with the problem that every user of 2014-01-03 will never see any regular update notification...
  • Loading branch information
nmlgc committed Jan 26, 2014
1 parent 61fd5d3 commit 6c02237
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion thcrap/src/init.c
Expand Up @@ -273,7 +273,8 @@ int thcrap_init(const char *run_cfg_fn)
// Why, hello there, C89.
int dummy = patch_rel_to_abs(patch_info, run_cfg_fn);

json_array_set_new(patches, i, patch_init(patch_info));
patch_info = patch_init(patch_info);
json_array_set(patches, i, patch_info);

cur_min_build = json_object_get_hex(patch_info, "min_build");
if(cur_min_build > min_build) {
Expand All @@ -286,6 +287,7 @@ int thcrap_init(const char *run_cfg_fn)
min_build = cur_min_build;
url_engine = json_object_get_string(patch_info, "url_engine");
}
json_decref(patch_info);
}
if(min_build > PROJECT_VERSION()) {
char format[11];
Expand Down

0 comments on commit 6c02237

Please sign in to comment.