Skip to content

Commit 044e9d4

Browse files
committed
Fix number of elements transferred
1 parent ef48294 commit 044e9d4

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

luaApp/src/rec/luaSoft.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ static long syncWrite(luascriptRecord* record, double* val, char* sval, struct l
148148
{
149149
case DBF_CHAR:
150150
case DBF_UCHAR:
151-
{
151+
{
152152
if (record->atyp == luascriptAVALType_Char)
153153
{
154154
return dbPutLink(out, DBF_CHAR, record->aval, array_len);
@@ -158,7 +158,7 @@ static long syncWrite(luascriptRecord* record, double* val, char* sval, struct l
158158
#if defined(_MSC_VER)
159159
char buffer[1024];
160160
#else
161-
char buffer[n_elements];
161+
char buffer[array_len];
162162
#endif
163163

164164
for (index = 0; index < n_elements && index < array_len; index += 1)
@@ -183,7 +183,7 @@ static long syncWrite(luascriptRecord* record, double* val, char* sval, struct l
183183
#if defined(_MSC_VER)
184184
double buffer[1024];
185185
#else
186-
double buffer[n_elements];
186+
double buffer[array_len];
187187
#endif
188188

189189
for (index = 0; index < n_elements && index < array_len; index += 1)
@@ -202,7 +202,7 @@ static long syncWrite(luascriptRecord* record, double* val, char* sval, struct l
202202
#if defined(_MSC_VER)
203203
float buffer[1024];
204204
#else
205-
float buffer[n_elements];
205+
float buffer[array_len];
206206
#endif
207207

208208
if (record->atyp == luascriptAVALType_Double)

0 commit comments

Comments
 (0)