1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
From 9085a7d766983a4d3aa9172a64b0e79c9cb01ae5 Mon Sep 17 00:00:00 2001
From: Remi Collet <remi@remirepo.net>
Date: Wed, 4 Mar 2020 08:49:20 +0100
Subject: [PATCH] fix c89
---
csv.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/csv.c b/csv.c
index 0ed90d3..77263b6 100644
--- a/csv.c
+++ b/csv.c
@@ -226,6 +226,7 @@ static HashTable* rfc4180_string_to_hashtable(
char **buffer, const size_t length, const zend_string *delimiter,
const zend_string *enclosure, const zend_string *eol_sequence)
{
+ size_t index;
HashTable *return_value = zend_new_array(8);
bool in_escaped_field = false;
@@ -237,7 +238,7 @@ static HashTable* rfc4180_string_to_hashtable(
size_t field_value_length = 0;
/* Main loop to "tokenize" the row */
- for (size_t index = 0; index < length; ++index) {
+ for (index = 0; index < length; ++index) {
/* Check for field escape sequence (i.e. enclosure) */
if (php_memnstr(row, ZSTR_VAL(enclosure), ZSTR_LEN(enclosure), row + ZSTR_LEN(enclosure))) {
row += ZSTR_LEN(enclosure);
--
2.24.1
|