cast to char to avoid C++11 issue

Fixes Issue 716.
This commit is contained in:
erwin.coumans
2012-09-11 03:58:11 +00:00
parent 1b7642f0f5
commit d99d9779a2
2 changed files with 837 additions and 839 deletions

View File

@@ -910,8 +910,7 @@ void dna_write(FILE *file, void *pntr, int size)
for (i = 0 ; i < size ; i++) for (i = 0 ; i < size ; i++)
{ {
unsigned char c =data[i]; fprintf(file, "char(%d),", data[i]);
fprintf(file, "%d,", c);
linelength++; linelength++;
if (linelength >= MAX_DNA_LINE_LENGTH) { if (linelength >= MAX_DNA_LINE_LENGTH) {
fprintf(file, "\n"); fprintf(file, "\n");
@@ -1213,10 +1212,10 @@ int main(int argc, char ** argv)
if (sizeof(void*)==8) if (sizeof(void*)==8)
{ {
fprintf (file, "unsigned char sBulletDNAstr64[]= {\n"); fprintf (file, "char sBulletDNAstr64[]= {\n");
} else } else
{ {
fprintf (file, "unsigned char sBulletDNAstr[]= {\n"); fprintf (file, "char sBulletDNAstr[]= {\n");
} }
if (make_structDNA(baseDirectory, file)) { if (make_structDNA(baseDirectory, file)) {

File diff suppressed because it is too large Load Diff