mkpkg: use correct script counter when writing scripts to adb

Previously this would result in post-upgrade scripts not being
written at all.
cute-signatures
Daniel Kolesa 2022-04-03 20:44:44 +02:00 committed by Timo Teräs
parent d06a99128f
commit 55e20d3e5b
1 changed files with 1 additions and 1 deletions

View File

@ -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);
}