Skip to content

Tiny readers crash when encountering trailing empty destination name columns #22

@NebelNidas

Description

@NebelNidas

If a mapping's destination name in a given namespace is equivalent to the source name, the Tiny formats allow to omit the relevant column's content (leading to two or more consecutive tabs, or trailing tabs at the end of the line). Example:

tiny	2	0	srcNs	dstNs1	dstNs2
c	class1	class1Rename	

The effective target names are:

  • srcNs: class1
  • dstNs1: class1Rename
  • dstNs2: class1

Currently though, SrgUtils's readers crash with the following exceptions respectively:

java.io.IOException: Invalid Tiny v2 line: #1: c class_1  
	at net.minecraftforge.srgutils.InternalUtils.tiny2Exception(InternalUtils.java:531)
	at net.minecraftforge.srgutils.InternalUtils.loadTinyV2(InternalUtils.java:466)

java.io.IOException: Invalid Tiny v1 line: #1
	at net.minecraftforge.srgutils.InternalUtils.loadTinyV1(InternalUtils.java:373)

It also seems like the line numbers are off by one (line 1 contains to the headers, not the class definitions).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions