fixed xerces xml base64 decode, by typecasting length correctly

Fixed a bug that caused compile error in 32 bit virtual machine. The error was due to not typecasting unsigned long pointer to (XMLSize_t*) , which is a type of size_t , both are 32 bit integers. 
Bug existed in two lines of the same type calling Base64::decode
Thanks Linus,


On Wed, Nov 26, 2014 at 10:18 PM, Linas Vepštas <notifications@github.com>
wrote:

> In opencog/embodiment/Control/PerceptionActionInterface/PAI.cc:
>
> > @@ -2651,7 +2651,7 @@ void PAI::processMapInfo(DOMElement* element, HandleSeq &toUpdateHandles, bool u
> >
> >          // Decode the base64 string into binary
> >          unsigned long length = (unsigned long)msg.size();
> > -        XMLByte* binary = Base64::decode((XMLByte*)msg.c_str(), &length);
> > +        XMLByte* binary = Base64::decode((XMLByte*)msg.c_str(),(XMLSize_t*) &length);
>
> Oh, plese don't do it that way: you are just asking for bizarro bugs to
> happen!
>
> The correct fix is to just say XMLSize_t length = (XMLSize_t) msg.size();
> one line higher up. That way, the size of the passed argument actually
> matches the size of what's being pointed to.
>
> Regards,
Mandeep

> —
> Reply to this email directly or view it on GitHub
> <https://github.com/opencog/opencog/pull/1124/files#r20936774>.
>