| Index: mojo/public/tools/bindings/generators/dart_templates/struct_definition.tmpl
|
| diff --git a/mojo/public/tools/bindings/generators/dart_templates/struct_definition.tmpl b/mojo/public/tools/bindings/generators/dart_templates/struct_definition.tmpl
|
| index 6e18dc89f36b683b70f7703f681d7540ce77d805..8b2fa42c2268efd68a31f2412082dae0512ac76e 100644
|
| --- a/mojo/public/tools/bindings/generators/dart_templates/struct_definition.tmpl
|
| +++ b/mojo/public/tools/bindings/generators/dart_templates/struct_definition.tmpl
|
| @@ -57,7 +57,7 @@ class {{struct.name}} {
|
| {%- if byte.packed_fields|length > 1 %}
|
| packed = 0;
|
| {%- for packed_field in byte.packed_fields %}
|
| - packed |= (val.{{packed_field.field.name}} & 1) << {{packed_field.bit}};
|
| + packed |= ((val.{{packed_field.field.name}} ? 1 : 0) & 1) << {{packed_field.bit}};
|
| {%- endfor %}
|
| encoder.writeUint8(packed);
|
| {%- else %}
|
|
|