Skip to content

Commit c752645

Browse files
committed
Fix wrong pointer.
1 parent 7da40e1 commit c752645

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

core/iwasm/libraries/wasi-nn/src/wasi_nn_tensorflowlite.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ load(void *tflite_ctx, graph_builder_array *builder, graph_encoding encoding,
140140
NN_ERR_PRINTF("Model too small to be a valid TFLite file.");
141141
return invalid_argument;
142142
}
143-
if (memcmp(tfl_ctx->models[*g].model_pointer + 4, "TFL3", 4) != 0) {
143+
if (memcmp(builder->buf[0].buf + 4, "TFL3", 4) != 0) {
144144
NN_ERR_PRINTF(
145145
"Model file is not a TFLite FlatBuffer (missing TFL3 identifier).");
146146
return invalid_argument;

0 commit comments

Comments
 (0)