mirror of
https://github.com/eclipse/upm.git
synced 2025-03-14 20:47:30 +03:00
sm130: fix std::min call having issues with template argument dedudction
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
This commit is contained in:
parent
03b9cf89a0
commit
5ed36a37f9
@ -26,6 +26,7 @@
|
||||
#include <unistd.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <algorithm>
|
||||
|
||||
#include "sm130.h"
|
||||
|
||||
@ -150,7 +151,7 @@ SM130::available () {
|
||||
case CMD_RESET:
|
||||
case CMD_VERSION:
|
||||
// RESET and VERSION commands produce the firmware version
|
||||
len = std::min ((unsigned int) getPacketLength (), sizeof (this->m_Version)) - 1;
|
||||
len = std::min ((unsigned int) getPacketLength(), (unsigned int) sizeof(this->m_Version)) - 1;
|
||||
memcpy(this->m_Version, this->m_Data + 2, len);
|
||||
this->m_Version[len] = 0;
|
||||
break;
|
||||
|
Loading…
x
Reference in New Issue
Block a user