void-packages/srcpkgs/openbabel/patches/unsigned_char.patch

33 lines
1.2 KiB
Diff

https://github.com/openbabel/openbabel/commit/ee11c98a655296550710db1207b294f00e168216
--- src/formats/pngformat.cpp.orig 2016-09-21 21:55:37.000000000 +0200
+++ src/formats/pngformat.cpp 2018-01-04 08:22:33.377616730 +0100
@@ -218,7 +218,7 @@
_count=0;
_hasInputPngFile=true;
}
- const char pngheader[] = {-119,80,78,71,13,10,26,10,0};
+ const unsigned char pngheader[] = {137,80,78,71,13,10,26,10,0};
char readbytes[9];
ifs.read(readbytes, 8);
--- src/formats/yasaraformat.cpp.orig 2016-09-21 21:55:37.000000000 +0200
+++ src/formats/yasaraformat.cpp 2018-01-04 09:00:45.636003936 +0100
@@ -472,7 +472,7 @@
// bool hetatom;
char buffer[32],/*resname[4],*/atomname[5];
- char double1[8]={0,0,0,0,0,0,-16,0x3f};
+ unsigned char double1[8]={0,0,0,0,0,0,0xf,0x3f};
// char *str;
int i,j,/*m,q,*/pos;
int /*resno,chainNum,link,linktype,*/atoms,element,links/*,chain*/;
@@ -500,7 +500,7 @@
mem_set(buffer,0,8);
for (i=0;i<4;i++)
{ for (j=0;j<4;j++)
- { if (i==j) ofs.write(double1,8);
+ { if (i==j) ofs.write((char*)double1,8);
else ofs.write(buffer,8); } }
storeint32le(buffer,MOB_INFOEND);
storeint32le(&buffer[4],MOB_INFOENDSIZE);