Skip to content

Commit

Permalink
fix: wrong array length
Browse files Browse the repository at this point in the history
  • Loading branch information
willssong committed Dec 15, 2021
1 parent 5fde157 commit 6576e5d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion include/gitinfo.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#ifndef __GIT_INFO_H_
#define __GIT_INFO_H_
#define GIT_COMMIT_ID "c2844bab369dce47db68ccf716b9045c37945c2a"
#define GIT_COMMIT_ID "5fde157e07a906008f93147eeb975150010ff0d9"
#endif
6 changes: 3 additions & 3 deletions samples/scenarized/light_data_template_sample.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
#include "lite-utils.h"
#include "qcloud_iot_export.h"
#include "qcloud_iot_import.h"
#include "utils_timer.h"
#include "utils_getopt.h"
#include "utils_timer.h"

#ifdef AUTH_MODE_CERT
static char sg_cert_file[PATH_MAX + 1]; // full path of device cert file
Expand Down Expand Up @@ -648,8 +648,8 @@ static int _on_recv_array_msg(DeviceProperty *p_prop)
}
} else if (!strcmp(key, "recent_status")) {
sg_DataTemplate[7].state = eCHANGED;
res = LITE_dt_parse_obj_array(sg_recent_status_array, MAX_SAMPLE_ARRAY_SIZE, sizeof(recent_status_t),
p_prop->data, _parse_rs_obj);
res = LITE_dt_parse_obj_array(sg_recent_status_array, MAX_SAMPLE_ARRAY_SIZE * sizeof(recent_status_t),
sizeof(recent_status_t), p_prop->data, _parse_rs_obj);
if (res > 0) {
sg_recent_status_array_size = res;
_refresh_recent_status();
Expand Down

0 comments on commit 6576e5d

Please sign in to comment.