Switch to ANSI C style C function declarations.
main(argc, argv) --> int main(int argc, char** argv)
Although we accept int, void, and char types, and pointers to same,
we actually still treat everything as an int.
diff --git a/libacc/tests/main.cpp b/libacc/tests/main.cpp
index 6b39f57..acee09d 100644
--- a/libacc/tests/main.cpp
+++ b/libacc/tests/main.cpp
@@ -68,12 +68,14 @@
fseek(in, 0, SEEK_END);
size_t fileSize = (size_t) ftell(in);
rewind(in);
- ACCchar* text = new ACCchar[fileSize];
+ ACCchar* text = new ACCchar[fileSize + 1];
size_t bytesRead = fread(text, 1, fileSize, in);
if (bytesRead != fileSize) {
fprintf(stderr, "Could not read all of file %s\n", inFile);
}
+ text[fileSize] = '\0';
+
ACCscript* script = accCreateScript();
const ACCchar* scriptSource[] = {text};