From e18a303d1c17acd30c21162826c554ee770cf35a Mon Sep 17 00:00:00 2001
From: AlexeyAB <alexeyab84@gmail.com>
Date: Sat, 21 Apr 2018 12:19:58 +0000
Subject: [PATCH] Fixed utils.c for short lines.
---
src/parser.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/parser.c b/src/parser.c
index 319235a..568e540 100644
--- a/src/parser.c
+++ b/src/parser.c
@@ -291,7 +291,7 @@
for (i = 0; i < len; ++i) {
if (a[i] == ',') ++n;
}
- for (i = 0; i < n; ++i) {
+ for (i = 0; i < n && i < total*2; ++i) {
float bias = atof(a);
l.biases[i] = bias;
a = strchr(a, ',') + 1;
@@ -344,7 +344,7 @@
for(i = 0; i < len; ++i){
if (a[i] == ',') ++n;
}
- for(i = 0; i < n; ++i){
+ for(i = 0; i < n && i < num*2; ++i){
float bias = atof(a);
l.biases[i] = bias;
a = strchr(a, ',')+1;
--
Gitblit v1.10.0