mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-21 02:32:06 +00:00
Use QUOTEDSTRLEN macro instead of sizeof or strlen
This commit is contained in:
@@ -10,7 +10,7 @@
|
||||
|
||||
#include "error.hpp"
|
||||
#include "extern/getopt.hpp"
|
||||
#include "helpers.hpp" // Defer
|
||||
#include "helpers.hpp"
|
||||
#include "parser.hpp"
|
||||
#include "version.hpp"
|
||||
|
||||
@@ -45,7 +45,7 @@ static std::string make_escape(std::string &str) {
|
||||
break;
|
||||
escaped.append(str, pos, nextPos - pos);
|
||||
escaped.append("$$");
|
||||
pos = nextPos + sizeof("$") - 1;
|
||||
pos = nextPos + QUOTEDSTRLEN("$");
|
||||
}
|
||||
escaped.append(str, pos, str.length() - pos);
|
||||
return escaped;
|
||||
|
||||
Reference in New Issue
Block a user