mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-17 06:17:50 +08:00
37 lines
843 B
Diff
37 lines
843 B
Diff
|
From 1c1ceecb70ad76751f0b573937380525d7643a87 Mon Sep 17 00:00:00 2001
|
||
|
From: reyzal <reyzal@163.com>
|
||
|
Date: Sun, 4 Mar 2018 12:09:34 +0800
|
||
|
Subject: [PATCH] for msvc
|
||
|
|
||
|
---
|
||
|
lib/identify.c | 5 +++--
|
||
|
1 file changed, 3 insertions(+), 2 deletions(-)
|
||
|
|
||
|
diff --git a/lib/identify.c b/lib/identify.c
|
||
|
index bf7bd94..cd16b0a 100644
|
||
|
--- a/lib/identify.c
|
||
|
+++ b/lib/identify.c
|
||
|
@@ -196,9 +196,9 @@ static void threshold(struct quirc *q)
|
||
|
threshold_s = THRESHOLD_S_MIN;
|
||
|
|
||
|
for (y = 0; y < q->h; y++) {
|
||
|
- int row_average[q->w];
|
||
|
+ int *row_average = malloc(q->w * sizeof(int));
|
||
|
|
||
|
- memset(row_average, 0, sizeof(row_average));
|
||
|
+ memset(row_average, 0, q->w * sizeof(int));
|
||
|
|
||
|
for (x = 0; x < q->w; x++) {
|
||
|
int w, u;
|
||
|
@@ -229,6 +229,7 @@ static void threshold(struct quirc *q)
|
||
|
}
|
||
|
|
||
|
row += q->w;
|
||
|
+ free(row_average);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
--
|
||
|
2.7.3.windows.1
|
||
|
|