修正 epanet_output 读取 bin 文件数据错误的问题
Some checks are pending
linux / build (push) Waiting to run
macOS / build (push) Waiting to run
epanet2-win32 / build (push) Waiting to run
epanet2-win64 / build (push) Waiting to run

This commit is contained in:
Huarch
2026-01-05 16:58:07 +08:00
committed by GitHub
parent 39407a3a17
commit 51caa50374

View File

@@ -750,7 +750,7 @@ int EXPORT_OUT_API ENR_getNodeResult(ENR_Handle p_handle, int periodIndex,
else
{
for (j = 0; j < NNODERESULTS; j++)
temp[j] = getNodeValue(p_handle, periodIndex, nodeIndex, j);
temp[j] = getNodeValue(p_handle, periodIndex, nodeIndex, j + 1);
*outValueArray = temp;
*length = NNODERESULTS;
@@ -778,7 +778,7 @@ int EXPORT_OUT_API ENR_getLinkResult(ENR_Handle p_handle, int periodIndex,
else
{
for (j = 0; j < NLINKRESULTS; j++)
temp[j] = getLinkValue(p_handle, periodIndex, linkIndex, j);
temp[j] = getLinkValue(p_handle, periodIndex, linkIndex, j + 1);
*outValueArray = temp;
*length = NLINKRESULTS;