Skip to content
Snippets Groups Projects
Commit e18b6e9c authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

std::min() wasn't in scope when using gcc <shrug>

parent 85d9915b
No related branches found
No related tags found
1 merge request!463MRC mods by Codefenix (2024-10-20)
......@@ -21,6 +21,7 @@
#include <climits>
#include <cstdint>
#include <algorithm> // std::min
#include "gen_defs.h"
#include "xpendian.h"
......@@ -36,7 +37,7 @@ public:
}
void operator = (const char* s) {
memset(buf, 0, size);
buf[0] = (uint8_t)min(size, strlen(s));
buf[0] = (uint8_t)std::min(size, strlen(s));
memcpy(buf + 1, s, len());
}
};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment