This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: cni converting String args[]



You need memory to put this in:

   len = JvGetStringUTFLength (argsElements[i]);
   char s[len];
   JvGetStringUTFRegion(argsElements[i], 0, argsElements[i]->length(), s);
   s[len] = 0;

Shouldn't that be: char s[len + 1]; ?


Andi..


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]