Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix field skipping code.

  • Loading branch information...
commit b04325163e5cdf06b169e77eee69c526fb15b532 1 parent ea283a7
Robert Brown authored
Showing with 5 additions and 5 deletions.
  1. +5 −5 wire-format.lisp
10 wire-format.lisp
View
@@ -94,11 +94,11 @@
(#.+start-group+
(loop (multiple-value-bind (tag new-index)
(varint:parse-uint32-carefully buffer index limit)
- (if (/= (ldb (byte 3 0) tag) +end-group+)
- (setf index (skip-field buffer new-index limit tag))
- (prog1 new-index
- (unless (= (- start-tag +start-group+) (- tag +end-group+))
- (error 'alignment)))))))
+ (cond ((/= (ldb (byte 3 0) tag) +end-group+)
+ (setf index (skip-field buffer new-index limit tag)))
+ ((= (- start-tag +start-group+) (- tag +end-group+))
+ (return new-index))
+ (t (error 'alignment))))))
(#.+fixed32+
(let ((new-index (+ index 4)))
(when (> new-index index) (error 'data-exhausted))
Please sign in to comment.
Something went wrong with that request. Please try again.