From 6d1f2aa2c3dd5db7a6435fe16e03d8df5e016775 Mon Sep 17 00:00:00 2001 From: Matthew Kosarek Date: Mon, 19 Apr 2021 20:55:07 -0400 Subject: Basics of the pill-pill simulation --- frontend/transpiler/pages.txt | 1 + frontend/transpiler/transpiler | Bin 38744 -> 38744 bytes frontend/transpiler/transpiler.cpp | 3 ++- 3 files changed, 3 insertions(+), 1 deletion(-) (limited to 'frontend/transpiler') 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" 🌠 "3D" 🔧 "WebAssembly" >>/intro/intro.html "Introduction" diff --git a/frontend/transpiler/transpiler b/frontend/transpiler/transpiler index 2f2d00b..5b6e14f 100755 Binary files a/frontend/transpiler/transpiler and b/frontend/transpiler/transpiler 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); -- cgit v1.2.1