ref: 6a462972cc8bf6cfe746520ae061c16475471bbf
parent: 2651f905367001db63c84b764f8ba9b6c2b1dc38
author: rjpals <rjpals@localhost>
date: Sun Nov 18 03:39:45 EST 2018
Dereference pointers (rather than printing memory addresses in dec format)
--- a/input.c
+++ b/input.c
@@ -1178,7 +1178,7 @@
fprint(logfd, "\n\tSeed: %d", sc->seed);
int x;
- for (x; x < (sc->inputs.size); x++) {
+ for (x = 0; x < (sc->inputs.size); x++) {
t_type* ele = lget(&(sc->inputs), x);
fprint(logfd, "\n\t\t%s : ", callnames[ele->t]);
@@ -1185,25 +1185,25 @@
switch(ele->t) {
case t_int :
- fprint(logfd, "%d", (int) ele->var);
+ fprint(logfd, "%d", *(int) ele->var);
break;
case t_uint :
- fprint(logfd, "%d", (unsigned int) ele->var);
+ fprint(logfd, "%d", *(unsigned int) ele->var);
break;
case t_long :
- fprint(logfd, "%ld", (long) ele->var);
+ fprint(logfd, "%ld", *(long) ele->var);
break;
case t_ulong :
- fprint(logfd, "%lu", (unsigned long) ele->var);
+ fprint(logfd, "%lu", *(unsigned long) ele->var);
break;
case t_vlong :
- fprint(logfd, "%llu", (long long) ele->var);
+ fprint(logfd, "%llu", *(long long) ele->var);
break;
case t_longS :
- fprint(logfd, "%ld", (long*) ele->var);
+ fprint(logfd, "%ld", *(long*) ele->var);
break;
case t_DirS :
- fprint(logfd, "%s", (Dir*) ele->var);
+ fprint(logfd, "%s", *(Dir*) ele->var);
break;
case t_charS :
fprint(logfd, "%s", (char*) ele->var);
@@ -1212,10 +1212,10 @@
//fprint(logfd, "%s", (char*) ele->var);
break;
case t_char :
- fprint(logfd, "%c", (char) ele->var);
+ fprint(logfd, "%c", *(char) ele->var);
break;
case t_uchar :
- fprint(logfd, "%c", (unsigned char) ele->var);
+ fprint(logfd, "%c", *(unsigned char) ele->var);
break;
default :
exits("Unknown input variable type!");