Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/build/linux/package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ mkdir -p package
cd package
rm *
cp ../qvmops ./
cp ../qagame.qvm.txt ./
cp ../readme.md ./
cd ..
2 changes: 1 addition & 1 deletion qvmops.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Created By:
#include <errno.h>
#include <stdint.h>

#define QVMOPS_VERSION "1.1.2"
#define QVMOPS_VERSION "2.0.0"

// length in bytes of each row of the "hex editor" view of the data segment
#define DATA_ROW_LEN 32
Expand Down
10 changes: 5 additions & 5 deletions symbols.c
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ static symbolmap_t parse_map_line_ex(char* line) {
}
lines[linecount].index = linecount;
lines[linecount].offset = strtoul(buf[1], NULL, 16);
lines[linecount].symbol = _strdup(buf[2]);
lines[linecount].symbol = strdup(buf[2]);
linecount++;
ret.segment = -1;
return ret;
Expand All @@ -202,12 +202,12 @@ static symbolmap_t parse_map_line_ex(char* line) {
// a
if (i < 0) {
ret.offset = i;
ret.symbol = _strdup(buf[3]);
ret.symbol = strdup(buf[3]);
}
// b
else {
ret.offset = strtoul(buf[1], NULL, 16);
ret.symbol = _strdup(buf[3]);
ret.symbol = strdup(buf[3]);
}
}
}
Expand All @@ -225,7 +225,7 @@ static symbolmap_t parse_map_line_ex(char* line) {
if (ret.segment == 2 && !strncmp(buf[3], "_stack", 6))
ret.segment = 3;
ret.offset = strtoul(buf[1], NULL, 16);
ret.symbol = _strdup(buf[3]);
ret.symbol = strdup(buf[3]);
}
else {
ret.segment = -1;
Expand Down Expand Up @@ -253,6 +253,6 @@ static symbolmap_t parse_map_line(char* line) {

ret.segment = atoi(buf[0]);
ret.offset = strtoul(buf[1], NULL, 16);
ret.symbol = _strdup(buf[2]);
ret.symbol = strdup(buf[2]);
return ret;
}
2 changes: 2 additions & 0 deletions util.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ char* strrstr(const char* str, const char* substr);
#define MINIMUM_BUFFER_SIZE 128
typedef intptr_t ssize_t;
ssize_t getline(char** lineptr, size_t* n, FILE* stream);

#define strdup _strdup
#endif

#endif // __QVMOPS_UTIL_H__