Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Main
Synchronet
Commits
d18654f7
Commit
d18654f7
authored
Mar 12, 2022
by
Rob Swindell
💬
Browse files
Fix min() not being in scope when using GCC <C++, shrug>
parent
4b5a75c3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
0 deletions
+2
-0
src/sbbs3/pcbdefs.hpp
src/sbbs3/pcbdefs.hpp
+2
-0
No files found.
src/sbbs3/pcbdefs.hpp
View file @
d18654f7
...
...
@@ -22,6 +22,7 @@
#ifndef PCBDEFS_HPP_
#define PCBDEFS_HPP_
#include <algorithm> // std::min
#include "endian.hpp"
namespace
PCBoard
{
...
...
@@ -47,6 +48,7 @@ class string {
char
value
[
size
]{};
public:
void
operator
=
(
const
char
*
s
)
{
using
std
::
min
;
memset
(
value
,
' '
,
size
);
memcpy
(
value
,
s
,
min
(
size
,
strlen
(
s
)));
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment