From 9e8f647440bfbdd1b59adb33ea386d89ad8a8f74 Mon Sep 17 00:00:00 2001 From: Juan Linietsky Date: Mon, 11 Jan 2016 11:44:53 -0300 Subject: fix issue loading binary pbm --- drivers/pnm/bitmap_loader_pnm.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'drivers/pnm') diff --git a/drivers/pnm/bitmap_loader_pnm.cpp b/drivers/pnm/bitmap_loader_pnm.cpp index 874e5977c1..cc7f8877be 100644 --- a/drivers/pnm/bitmap_loader_pnm.cpp +++ b/drivers/pnm/bitmap_loader_pnm.cpp @@ -170,12 +170,15 @@ RES ResourceFormatPBM::load(const String &p_path,const String& p_original_path,E } DVector::Read r=token.read(); - + int bitwidth = width; + if (bidtwidth % 8) + bitwidth+=8-(bitwidth%8); + for(int i=0;iset_bit(Point2i(j,i),num=='0'); } -- cgit v1.2.3