Skip to content

Commit

Permalink
Fix cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinresol committed Sep 8, 2018
1 parent f3ca174 commit a81cd00
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/tink/json/Parser.hx
Original file line number Diff line number Diff line change
Expand Up @@ -339,8 +339,9 @@ class BasicParser {
s.substr(0, maxLength) + ' ...';
else
s;

var center = (pos + end) >> 1;

var p:Int = pos + end;
var center = p >> 1;
var context = clip(source.substring(0, pos), 20, true) + ' ----> ' + clip(source.substring(pos, center), 20, false) + clip(source.substring(center, end), 20, true) + ' <---- ' + clip(source.substring(end), 20, false);

return Error.withData(UnprocessableEntity, s+' at $range in $context', { source: source, start: pos, end: end }).throwSelf();
Expand Down

0 comments on commit a81cd00

Please sign in to comment.