           return n
         }
       }
-    } else if let u = try parseBareUInt(source: source,
-                                        index: &index,
-                                        end: source.endIndex) {
+    } else if let u = try parseBareUInt64(source: source,
+                                          index: &index,
+                                          end: source.endIndex) {
       return u
     }
     throw JSONDecodingError.malformedNumber


  // Parse the leading Int64 from the provided utf8.
  //
  // This uses parseBareUInt() to do the heavy lifting;
  // we just check for a leading minus and negate the result
  // as necessary.
  //
  // As with parseBareUInt(), if it encounters a "\" backslash
  // character, it returns a nil.  This is used by callers that are
  // parsing quoted numbers.  See nextSInt() and nextUInt() below.

  private func parseBareSInt(
    source: UnsafeBufferPointer<UInt8>,
    index: inout UnsafeBufferPointer<UInt8>.Index,
    end: UnsafeBufferPointer<UInt8>.Index

      if digit < asciiZero || digit > asciiNine {
        throw JSONDecodingError.malformedNumber
      }
      if let n = try parseBareUInt64(source: source, index: &index, end: end) {
        let limit: UInt64 = 0x8000000000000000 // -Int64.min
        if n >= limit {
          if n > limit {
