Skip to content

Commit

Permalink
Fix off-by-1 error in custom model node positions.
Browse files Browse the repository at this point in the history
  • Loading branch information
cpinkham committed Apr 16, 2024
1 parent 59b6f7a commit 1746fdd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/overlays/PixelOverlayModel.cpp
Expand Up @@ -226,7 +226,7 @@ PixelOverlayModel::PixelOverlayModel(const Json::Value& c) :

for (int cho = 0; cho < 3; cho++) {
if (node != -1 && cho < channelsPerNode) {
channelMap[(y * width * 3) + (x * 3) + cho] = node * channelsPerNode + cho;
channelMap[(y * width * 3) + (x * 3) + cho] = (node - 1) * channelsPerNode + cho;
} else {
channelMap[(y * width * 3) + (x * 3) + cho] = FPPD_OFF_CHANNEL;
}
Expand Down

0 comments on commit 1746fdd

Please sign in to comment.