Radish alpha
H
rad:z3QDZAW2FAfuLvihrhiyDC9fAD8G9
HardenedBSD Package Manager
Radicle
Git
Add and assert to make sure the type passed to the pkg_script_run is a known type.
Baptiste Daroussin committed 14 years ago
commit 44a26b208818b96e6ed8c528c7621290a1c0740d
parent 6230538
1 file changed +1 -0
modified libpkg/scripts.c
@@ -33,6 +33,7 @@ pkg_script_run(struct pkg * const pkg, pkg_script_t type)
			break;
	}

+
	assert(i < sizeof(map) / sizeof(map[0]));
	assert(map[i].a == type);

	while (pkg_scripts(pkg, &script) == EPKG_OK) {