private int getPascalLength() {
		try {
			switch (stringLayout) {
				case PASCAL_255:
					return SIZEOF_PASCAL255_STR_LEN_FIELD +
						(buf.getUnsignedByte(0) * paddedCharSize);
				case PASCAL_64k:
					return SIZEOF_PASCAL64k_STR_LEN_FIELD +
						(buf.getUnsignedShort(0) * paddedCharSize);
				default:
					return -1;
			}
		}
		catch (MemoryAccessException e) {
			Msg.error(this, "PascalString error: " + e.getMessage());
			return -1;
		}
	}
Returns true if the string should have a trailing NULL character and doesn't.

@return boolean true if the trailing NULL character is missing, false if string type doesn't
        need a trailing NULL character or if it is present.
Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/data/StringDataInstance.java