Skip to content

Commit

Permalink
Fix check condition bug of field index in hive generator
Browse files Browse the repository at this point in the history
  • Loading branch information
MaGaroo authored and themisir committed Jul 14, 2021
1 parent b110329 commit 8873f75
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion hive_generator/lib/src/type_adapter_generator.dart
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ class TypeAdapterGenerator extends GeneratorForAnnotation<HiveType> {

void verifyFieldIndices(List<AdapterField> fields) {
for (var field in fields) {
check(field.index >= 0 || field.index <= 255,
check(field.index >= 0 && field.index <= 255,
'Field numbers can only be in the range 0-255.');

for (var otherField in fields) {
Expand Down

0 comments on commit 8873f75

Please sign in to comment.