silentorbit/protobuf

Error parsing messages named using '_'

uldall opened this issue · 0 comments

Hello,

I have the following .proto file:

package Test;

message __FileCheckSum {
    required string path = 2;
    required string sha = 3;
}

Parsing this file results in the following error:

[ERROR] FATAL UNHANDLED EXCEPTION: System.ArgumentOutOfRangeException: startIndex + length > this.length
Parameter name: length
  at System.String.Substring (Int32 startIndex, Int32 length) [0x00085] in /media/storage/extgit/mono/mcs/class/corlib/System/String.cs:342 
  at ProtocolBuffers.ProtoPrepare.GetCamelCase (System.String name) [0x00000] in <filename unknown>:0 
  at ProtocolBuffers.ProtoPrepare.PrepareMessage (ProtocolBuffers.ProtoMessage m) [0x00000] in <filename unknown>:0 
  at ProtocolBuffers.ProtoPrepare.Prepare (ProtocolBuffers.ProtoCollection file) [0x00000] in <filename unknown>:0 
  at ProtocolBuffers.MainClass.Main (System.String[] args) [0x00000] in <filename unknown>:0 
The application was terminated by a signal: SIGHUP

It seems that the problem is caused by the leading '_' in the message name.