summaryrefslogtreecommitdiff
path: root/frontend/transpiler
diff options
context:
space:
mode:
authorMatthew Kosarek <mattkae@protonmail.com>2021-04-19 20:55:07 -0400
committerMatthew Kosarek <mattkae@protonmail.com>2021-04-19 20:55:07 -0400
commit6d1f2aa2c3dd5db7a6435fe16e03d8df5e016775 (patch)
tree15c3a9cae679731ed38feff6bfdfefb46a5e686b /frontend/transpiler
parentdb4bcc0073fa1042e9779453af1dcdef7582fbd1 (diff)
Basics of the pill-pill simulation
Diffstat (limited to 'frontend/transpiler')
-rw-r--r--frontend/transpiler/pages.txt1
-rwxr-xr-xfrontend/transpiler/transpilerbin38744 -> 38744 bytes
-rw-r--r--frontend/transpiler/transpiler.cpp3
3 files changed, 3 insertions, 1 deletions
diff --git a/frontend/transpiler/pages.txt b/frontend/transpiler/pages.txt
index caa420c..bd779dd 100644
--- a/frontend/transpiler/pages.txt
+++ b/frontend/transpiler/pages.txt
@@ -7,6 +7,7 @@
>>/2d/_collisions/circle_line.html "Circle-Line"
>>/2d/_collisions/rectangle_line.html "Rectangle-Line"
>>/2d/_collisions/pill_line.html "Pill-Line"
+>>/2d/_collisions/pill_pill.html "Pill-Pill"
&#127776; "3D"
&#128295; "WebAssembly"
>>/intro/intro.html "Introduction"
diff --git a/frontend/transpiler/transpiler b/frontend/transpiler/transpiler
index 2f2d00b..5b6e14f 100755
--- a/frontend/transpiler/transpiler
+++ b/frontend/transpiler/transpiler
Binary files differ
diff --git a/frontend/transpiler/transpiler.cpp b/frontend/transpiler/transpiler.cpp
index 4771314..fa9820a 100644
--- a/frontend/transpiler/transpiler.cpp
+++ b/frontend/transpiler/transpiler.cpp
@@ -206,7 +206,6 @@ int main() {
// Write navigation bar
sb.addStr(navbarRetval.getValue());
-
// Read body
fseek(contentFile, 0, SEEK_END);
@@ -215,9 +214,11 @@ int main() {
char* bodyContent = new char[fsize + 1];
fread(bodyContent, 1, fsize, contentFile);
+ bodyContent[fsize] = '\0';
sb.addStr(bodyContent);
delete [] bodyContent;
+
contentFileName.free();
fclose(contentFile);