summaryrefslogtreecommitdiffstatshomepage
path: root/src/lib/util
diff options
context:
space:
mode:
author AJR <ajrhacker@users.noreply.github.com>2021-09-15 22:13:10 -0400
committer AJR <ajrhacker@users.noreply.github.com>2021-09-15 22:13:10 -0400
commit92ce4078b1086fcb53fc931fb5a81b9fd54ad509 (patch)
tree50f4d6ed00420560a5df685636ecc0f64b9a2a46 /src/lib/util
parent43133765c1f5c0c72850a99ba708e328bf8b0d7e (diff)
Fix build on systems where size_t is not the same as uint64_t
Diffstat (limited to 'src/lib/util')
-rw-r--r--src/lib/util/jedparse.cpp4
-rw-r--r--src/lib/util/plaparse.cpp8
2 files changed, 6 insertions, 6 deletions
diff --git a/src/lib/util/jedparse.cpp b/src/lib/util/jedparse.cpp
index f883aa747b9..b667121b7ba 100644
--- a/src/lib/util/jedparse.cpp
+++ b/src/lib/util/jedparse.cpp
@@ -194,7 +194,7 @@ int jed_parse(util::random_read &src, jed_data *result)
{
jed_parse_info pinfo;
int i;
- uint64_t actual;
+ std::size_t actual;
/* initialize the output and the intermediate info struct */
memset(result, 0, sizeof(*result));
@@ -405,7 +405,7 @@ int jedbin_parse(util::read_stream &src, jed_data *result)
/* need at least 4 bytes */
uint8_t buf[4];
- uint64_t actual;
+ std::size_t actual;
if (src.read(&buf[0], 4, actual) || actual != 4)
return JEDERR_INVALID_DATA;
diff --git a/src/lib/util/plaparse.cpp b/src/lib/util/plaparse.cpp
index a085a27b635..798abf41c23 100644
--- a/src/lib/util/plaparse.cpp
+++ b/src/lib/util/plaparse.cpp
@@ -69,7 +69,7 @@ static uint32_t suck_number(util::random_read &src)
// find first digit
uint8_t ch;
- uint64_t actual;
+ std::size_t actual;
bool found = false;
while (!src.read(&ch, 1, actual) && actual == 1)
{
@@ -193,7 +193,7 @@ static bool process_terms(jed_data *data, util::random_read &src, uint8_t &ch, p
curoutput = 0;
}
- uint64_t actual;
+ std::size_t actual;
if (src.read(&ch, 1, actual))
return false;
if (actual != 1)
@@ -233,7 +233,7 @@ static bool process_field(jed_data *data, util::random_read &src, parse_info *pi
int destptr = 0;
uint8_t seek;
- uint64_t actual;
+ std::size_t actual;
while (!src.read(&seek, 1, actual) && actual == 1 && isalpha(seek))
{
dest[destptr++] = tolower(seek);
@@ -329,7 +329,7 @@ int pla_parse(util::random_read &src, jed_data *result)
memset(result->fusemap, 0, sizeof(result->fusemap));
uint8_t ch;
- uint64_t actual;
+ std::size_t actual;
while (!src.read(&ch, 1, actual) && actual == 1)
{
switch (ch)