File tree Expand file tree Collapse file tree 2 files changed +3
-5
lines changed
Expand file tree Collapse file tree 2 files changed +3
-5
lines changed Original file line number Diff line number Diff line change 55SubstrateCS /Release /
66* .sdf
77* .user
8+ ** /UserPrefs.xml
Original file line number Diff line number Diff line change @@ -269,10 +269,7 @@ private TagNode ReadString ()
269269 Array . Reverse ( lenBytes ) ;
270270 }
271271
272- short len = BitConverter . ToInt16 ( lenBytes , 0 ) ;
273- if ( len < 0 ) {
274- throw new NBTException ( NBTException . MSG_READ_NEG ) ;
275- }
272+ ushort len = BitConverter . ToUInt16 ( lenBytes , 0 ) ;
276273
277274 byte [ ] strBytes = new byte [ len ] ;
278275 _stream . Read ( strBytes , 0 , len ) ;
@@ -574,7 +571,7 @@ private void WriteString (TagNodeString val)
574571 System . Text . Encoding str = Encoding . UTF8 ;
575572 byte [ ] gzBytes = str . GetBytes ( val . Data ) ;
576573
577- byte [ ] lenBytes = BitConverter . GetBytes ( ( short ) gzBytes . Length ) ;
574+ byte [ ] lenBytes = BitConverter . GetBytes ( ( ushort ) gzBytes . Length ) ;
578575
579576 if ( BitConverter . IsLittleEndian ) {
580577 Array . Reverse ( lenBytes ) ;
You can’t perform that action at this time.
0 commit comments