AvantTeam / ProjectUnityPublic

A public, stripped down workspace of the Project Unity mod, a mega-collaboration Mindustry mod. Not intended to be played yet; this is purely for code publicity and healthy competition reasons.
GNU General Public License v3.0
174 stars 29 forks source link

Pasting non-schematic in unit assembler crashes the game #21

Closed SMOLKEYS closed 2 years ago

SMOLKEYS commented 2 years ago
  1. Copy non schematic text
  2. Paste to unit assembler
  3. > IllegalArgument: 'Illegal base64 character 3a'
    Base64$Decoder.decode0: 714
    Base64$Decoder.decode: 526
    Base64$Decoder.decode: 549
    PartsEditorDialog.lambda$new$16$PartsEditorDialog: 147
    -$$Lambda$PartsEditorDialog$9QanMcxbf4OXT2JC1iIHzcTFt_k.run: 2
    Element$9.changed: 968
    ChangeListener.handle: 13
    Element.notify: 162
    Element.fire: 133
    Button.setChecked: 106
    Button$1.clicked: 92
    ClickListener.touchUp: 77
    InputListener.handle: 31
    Scene.touchUp: 366
    InputMultiplexer.touchUp: 136
    AndroidInput.processEvents: 294
    AndroidGraphics.onDrawFrame: 367
    GLSurfaceView$GLThread.guardedRun: 1571
    GLSurfaceView$GLThread.run: 1270
Goobrr commented 2 years ago

what did you think was gonna happen

a header check can prevent this, thanks for reporting

Xeloboyo commented 2 years ago

id need to wrap it in a try-catch, since its possible there'd be garbage behind the header