startop: Fix the if condition to prevent duplicate filename for file id
0 in host compiler. Test: pytest Bug: 140655545 Change-Id: I952db4cf06060483cfcf8e42352324ad0d710d3b
This commit is contained in:
@@ -139,7 +139,9 @@ def build_protobuf(page_runs, inode2filename, filters=[]):
|
||||
continue
|
||||
|
||||
file_id = file_id_map.get(filename)
|
||||
if not file_id:
|
||||
# file_id could 0, which satisfies "if file_id" and causes duplicate
|
||||
# filename for file id 0.
|
||||
if file_id is None:
|
||||
file_id = file_id_counter
|
||||
file_id_map[filename] = file_id_counter
|
||||
file_id_counter = file_id_counter + 1
|
||||
|
||||
Reference in New Issue
Block a user