From 761b08ec8f2702582f064ddfaf0a1c530cac2e05 Mon Sep 17 00:00:00 2001 From: Ariel Manzur Date: Tue, 12 Jan 2016 06:19:56 -0300 Subject: [PATCH] loading unaligned pbm --- drivers/pnm/bitmap_loader_pnm.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/pnm/bitmap_loader_pnm.cpp b/drivers/pnm/bitmap_loader_pnm.cpp index b57533e5217..c9298be26af 100644 --- a/drivers/pnm/bitmap_loader_pnm.cpp +++ b/drivers/pnm/bitmap_loader_pnm.cpp @@ -170,15 +170,12 @@ RES ResourceFormatPBM::load(const String &p_path,const String& p_original_path,E } DVector::Read r=token.read(); - int bitwidth = width; - if (bitwidth % 8) - bitwidth+=8-(bitwidth%8); for(int i=0;iset_bit(Point2i(j,i),num=='0'); } @@ -197,11 +194,14 @@ RES ResourceFormatPBM::load(const String &p_path,const String& p_original_path,E } DVector::Read r=token.read(); + int bitwidth = width; + if (bitwidth % 8) + bitwidth+=8-(bitwidth%8); for(int i=0;i>(7-(ofs%8)))&1;