Index: trunk/src/org/openstreetmap/josm/data/protobuf/ProtobufParser.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/protobuf/ProtobufParser.java	(revision 18825)
+++ trunk/src/org/openstreetmap/josm/data/protobuf/ProtobufParser.java	(revision 18826)
@@ -52,6 +52,5 @@
      * @param start    The start position in the byte array
      * @param end      The end position in the byte array (exclusive - [start, end) )
-     * @return t
-     * he number from the byte array. Depending upon length of time the number will be stored, narrowing may be helpful.
+     * @return the number from the byte array. Depending upon length of time the number will be stored, narrowing may be helpful.
      * @since 18695
      */
@@ -101,5 +100,5 @@
      */
     public static long decodeZigZag(long signed) {
-        return (signed >> 1) ^ -(signed & 1);
+        return (signed >>> 1) ^ -(signed & 1);
     }
 
Index: trunk/src/org/openstreetmap/josm/io/OsmPbfReader.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/OsmPbfReader.java	(revision 18825)
+++ trunk/src/org/openstreetmap/josm/io/OsmPbfReader.java	(revision 18826)
@@ -632,5 +632,5 @@
                 switch (protobufRecord.getField()) {
                     case 1:
-                        id = protobufRecord.asUnsignedVarInt().intValue();
+                        id = protobufRecord.asUnsignedVarInt().longValue();
                         break;
                     case 2:
@@ -699,5 +699,5 @@
                 switch (protobufRecord.getField()) {
                     case 1:
-                        id = protobufRecord.asUnsignedVarInt().intValue();
+                        id = protobufRecord.asUnsignedVarInt().longValue();
                         break;
                     case 2:
@@ -838,7 +838,4 @@
      */
     private static void setOsmPrimitiveData(PrimitiveBlockRecord primitiveBlockRecord, PrimitiveData primitive, Info info) {
-        if (info.changeset() != null) {
-            primitive.setChangesetId(Math.toIntExact(info.changeset()));
-        }
         primitive.setVisible(info.isVisible());
         if (info.timestamp() != null) {
@@ -852,4 +849,7 @@
         if (info.version() > 0) {
             primitive.setVersion(info.version());
+        }
+        if (info.changeset() != null) {
+            primitive.setChangesetId(Math.toIntExact(info.changeset()));
         }
     }
