Skip to content

Commit

Permalink
tools: minor performance improvement
Browse files Browse the repository at this point in the history
PR-URL: nodejs#16125
Reviewed-By: Anna Henningsen <[email protected]>
  • Loading branch information
addaleax committed Oct 14, 2017
1 parent 695b307 commit 80bd2a2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tools/genv8constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,10 @@ def out_define():
# 6-character margin, 2-characters + 1 space for each field
idx = 6 + i * 3;
octetstr = line[idx:idx+3]
if not numpattern.match(octetstr):
if curr_octet > octets:
break;

if curr_octet > octets:
if not numpattern.match(octetstr):
break;

curr_val += int('0x%s' % octetstr, 16) << (curr_octet * 8);
Expand Down

0 comments on commit 80bd2a2

Please sign in to comment.