penrose

program for generating penrose tilings.
Log | Files | Refs | README | LICENSE

commit 14afef0bfa2ce97750db89260105e9d799ee1bf1
parent 1bfd507a21918e7a38218c97c47be528fd9712ed
Author: mpizzzle <m@michaelpercival.xyz>
Date:   Sat, 14 Nov 2020 20:08:51 +0000

correcting random error

Diffstat:
Mpenrose.cpp | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/penrose.cpp b/penrose.cpp @@ -189,9 +189,9 @@ int main() { int frame_w, frame_h; glfwGetFramebufferSize(window, &frame_w, &frame_h); - png_bytep* row_pointers = (png_bytep*) malloc(sizeof(unsigned char) * frame_h); + png_bytep* row_pointers = (png_bytep*) malloc(sizeof(png_bytep) * frame_h); - for (unsigned int yy = 0; yy < frame_h; ++yy) { + for (int yy = 0; yy < frame_h; ++yy) { row_pointers[yy] = (png_byte*) malloc((4 * sizeof(png_byte)) * frame_w); glReadPixels(0, yy, frame_w, 1, GL_RGBA, GL_UNSIGNED_BYTE, row_pointers[yy]); }