diff options
author | Daniel Kolesa <daniel@octaforge.org> | 2022-04-03 20:44:44 +0200 |
---|---|---|
committer | Timo Teräs <timo.teras@iki.fi> | 2022-04-04 05:05:08 +0000 |
commit | 55e20d3e5b48eea29523b633492a167118dcc3bd (patch) | |
tree | 850d418a16ddbb3ec1e5d40d1ccf3008d8716bfa | |
parent | d06a99128fa08716d4a84bb1925f69879e2234a2 (diff) | |
download | apk-tools-55e20d3e5b48eea29523b633492a167118dcc3bd.tar.gz apk-tools-55e20d3e5b48eea29523b633492a167118dcc3bd.tar.bz2 apk-tools-55e20d3e5b48eea29523b633492a167118dcc3bd.tar.xz apk-tools-55e20d3e5b48eea29523b633492a167118dcc3bd.zip |
mkpkg: use correct script counter when writing scripts to adb
Previously this would result in post-upgrade scripts not being
written at all.
-rw-r--r-- | src/app_mkpkg.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/app_mkpkg.c b/src/app_mkpkg.c index e085090..43bee56 100644 --- a/src/app_mkpkg.c +++ b/src/app_mkpkg.c @@ -286,7 +286,7 @@ static int mkpkg_main(void *pctx, struct apk_ctx *ac, struct apk_string_array *a if (ctx->has_scripts) { struct adb_obj scripts; adb_wo_alloca(&scripts, &schema_scripts, &ctx->db); - for (i = ADBI_FIRST; i < APK_SCRIPT_MAX; i++) + for (i = ADBI_FIRST; i < ADBI_SCRPT_MAX; i++) adb_wo_blob(&scripts, i, ctx->script[i]); adb_wo_obj(&pkg, ADBI_PKG_SCRIPTS, &scripts); } |