On 5/19/06, Jakson Aquino <[EMAIL PROTECTED]> wrote:
Thank you for your report. I will look into it. Can you give me an example in which case metar reports the wrong data? That makes it easier for me to debug the problem.
Thank youPackage: metar
Version: 20060405.1-1
Severity: normal
Hi,
metar is reporting wrong cloud levels.
I think that replacing the number "3" with the "99" will fix
the problem, as in the patch below:
--- metar-20060405.1.orig/src/metar.c
+++ metar-20060405.1/src/metar.c
@@ -350,7 +350,7 @@
memcpy(&cloud->type, token+pmatch[1].rm_so, (size < 3 ? size : 3));
size=pmatch[2].rm_eo - pmatch[2].rm_so;
- memset(tmp, 0x0, 3);
+ memset(tmp, 0x0, 99);
memcpy(tmp, token+pmatch[2].rm_so, (size < 3 ? size : 3));
sscanf(tmp, "%d", (int*)&cloud->level);
Thanks,
Jakson
Thank you for your report. I will look into it. Can you give me an example in which case metar reports the wrong data? That makes it easier for me to debug the problem.
Kees
--
Kees Leune <[EMAIL PROTECTED]>