XFE Git
XFE Studio Git
Git 首页 全局搜索
XFE 主站 文档 NuGet

SpaceNinjaServer

A simple server for a small space ninja game

公开
关注 0 Fork 1 Star 0
返回提交历史

XFEstudio/SpaceNinjaServer

fix: ignore client providing not-an-id in recipe ids array (#1990)

Closes #1989 Reviewed-on: https://onlyg.it/OpenWF/SpaceNinjaServer/pulls/1990 Co-authored-by: Sainan <63328889+Sainan@users.noreply.github.com> Co-committed-by: Sainan <63328889+Sainan@users.noreply.github.com>

f6cbc02c
Sainan <63328889+Sainan@users.noreply.github.com>
提交于

代码差异

1 个文件 +1 -1
Modified src/controllers/api/startRecipeController.ts +1 -1
@@ -41,7 +41,7 @@ export const startRecipeController: RequestHandler = async (req, res) => {
41 41 ];
42 42
43 43 for (let i = 0; i != recipe.ingredients.length; ++i) {
44 if (startRecipeRequest.Ids[i]) {
44 if (startRecipeRequest.Ids[i] && startRecipeRequest.Ids[i][0] != "/") {
45 45 const category = ExportWeapons[recipe.ingredients[i].ItemType].productCategory;
46 46 if (category != "LongGuns" && category != "Pistols" && category != "Melee") {
47 47 throw new Error(`unexpected equipment ingredient type: ${category}`);