Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion api/Common.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
/* C++ prototypes */
long map(long x, long in_min, long in_max, long out_min, long out_max)
{
return (x - in_min) * (out_max - out_min) / (in_max - in_min) + out_min;
return (long)((long long)(x - in_min) * (out_max - out_min) / (in_max - in_min) + out_min);
}

uint16_t makeWord(uint16_t w) { return w; }
Expand Down
Loading