shithub: pdffs

Download patch

ref: c085dfceecb7785e630bc7c42698ddac1438b15b
parent: 5434f5762ec22c52803a9db370cbed81d406d857
author: Noam Preil <noam@pixelhero.dev>
date: Tue Sep 6 23:04:03 EDT 2022

render: oops

--- a/op.c
+++ b/op.c
@@ -1358,13 +1358,13 @@
 Object*
 pagecropbox(Page *p)
 {
-	Object *page = p;
+	Object *page = p->obj;
 	Object *o;
 	while(page != &null){
-		o = dictget(p->obj, "CropBox");
+		o = dictget(page, "CropBox");
 		if(o != &null)
 			return o;
-		o = dictget(p->obj, "MediaBox");
+		o = dictget(page, "MediaBox");
 		if(o != &null)
 			return o;
 		page = dictget(page, "Parent");