Skip to content

Commit

Permalink
Fix openbabel#1689 by using positive values and explicitly stating un…
Browse files Browse the repository at this point in the history
…signed char
  • Loading branch information
baoilleach committed Jan 3, 2018
1 parent 7972033 commit e264910
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/formats/pngformat.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ bool PNGFormat::ReadMolecule(OBBase* pOb, OBConversion* pConv)
_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);

Expand Down
2 changes: 1 addition & 1 deletion src/formats/yasaraformat.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -472,7 +472,7 @@ bool YOBFormat::WriteMolecule(OBBase* pOb, OBConversion* pConv)

// 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,0xf0,0x3f};
// char *str;
int i,j,/*m,q,*/pos;
int /*resno,chainNum,link,linktype,*/atoms,element,links/*,chain*/;
Expand Down

0 comments on commit e264910

Please sign in to comment.