summaryrefslogtreecommitdiff
path: root/src/sp_utils.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/sp_utils.c')
-rw-r--r--src/sp_utils.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/sp_utils.c b/src/sp_utils.c
index 62cb1a1..18f82fe 100644
--- a/src/sp_utils.c
+++ b/src/sp_utils.c
@@ -1,6 +1,7 @@
1#include "php_snuffleupagus.h" 1#include "php_snuffleupagus.h"
2 2
3#include <fcntl.h> 3#include <fcntl.h>
4#include <inttypes.h>
4#include <stdio.h> 5#include <stdio.h>
5#include <stdlib.h> 6#include <stdlib.h>
6#include <string.h> 7#include <string.h>
@@ -142,7 +143,7 @@ int sp_log_request(const char* folder, const char* text_repr) {
142 const char* key = ZSTR_VAL(variable_key); 143 const char* key = ZSTR_VAL(variable_key);
143 144
144 if (Z_TYPE_INFO_P(variable_value) == IS_LONG) { 145 if (Z_TYPE_INFO_P(variable_value) == IS_LONG) {
145 fprintf(file, "%s=%ld\n", key, Z_DVAL_P(variable_value)); 146 fprintf(file, "%s=%" PRId64 "\n", key, Z_LVAL_P(variable_value));
146 } else if (Z_TYPE_INFO_P(variable_value) == IS_DOUBLE) { 147 } else if (Z_TYPE_INFO_P(variable_value) == IS_DOUBLE) {
147 fprintf(file, "%s=%lf\n", key, Z_DVAL_P(variable_value)); 148 fprintf(file, "%s=%lf\n", key, Z_DVAL_P(variable_value));
148 } else if (Z_TYPE_INFO_P(variable_value) == IS_ARRAY) { 149 } else if (Z_TYPE_INFO_P(variable_value) == IS_ARRAY) {