Excellent, I'll see that it gets into the trunk code.

Thanks,

Brian Pratt

On Thu, Dec 10, 2009 at 8:13 AM, dctrud <[email protected]> wrote:

> I've noticed that when clicking the "Evaluate Ratio" button on the
> ASAPRatioPeptideCGIDisplayParser.cgi screen I often encounter an
> Invalid peptide index: '0' error.
>
> Have looked through the code and noticed this is down to the
> extraction of values from queryStr in
> ASAPRatio_txtFns.c:getHtmlFieldValue(...).
>
> When looking for the field name 'Indx', 'cidIndx' can be erroneously
> matched and its value extracted instead of the Indx value. I.E.,
> partial matches to parameter names are allowed in the code.
>
> The following fix checks that a match is to a complete field_name,
> i.e. there is an '&' immediately preceding the match, or the match is
> at the start of the query string.
>
> Don't know whether this has been fixed already (I'm using 4.3.1
> release), but thought I would share the change.
>
> DT
>
>
> Index: Quantitation/ASAPRatio/ASAPRatio_Fns/ASAPRatio_txtFns.c
> ===================================================================
> --- Quantitation/ASAPRatio/ASAPRatio_Fns/ASAPRatio_txtFns.c     (revision
> 146)
> +++ Quantitation/ASAPRatio/ASAPRatio_Fns/ASAPRatio_txtFns.c     (working
> copy)
> @@ -225,6 +225,7 @@
>     ++queryIndx;
>   } //while(indx <= queryLngth) {
>   queryStr[queryIndx] = '\0';
> +
>
>   return queryStr;
>  }
> @@ -258,8 +259,13 @@
>   int strIndx = 0;
>   int i;
>
> -  while((tmpValue = strstr(queryString+strIndx, fieldName)) != NULL)
> {
> +  while((tmpValue = strstr(queryString+strIndx, fieldName)) != NULL )
> {
> +
> +
>     lngth = (int)strlen(tmpValue);
> +
> +   if ( (tmpValue == queryString || *(tmpValue-1) == '&') ) {
> +
>     for (i = fLngth; i < lngth; ++i){
>       if(isspace(tmpValue[i]) == 0){
>        if(tmpValue[i] == '='){ // match
> @@ -282,7 +288,12 @@
>        }
>       } // if(isspace(tmpValue[i]) == 0){
>     } // for (i = strlen(fieldName); i < strlen(tmpValue); ++i){
> -    strIndx = qLngth - lngth + fLngth;
> +
> +  } //  if ( (tmpValue == queryString || *(tmpValue-1) == '&') )
> +
> +  strIndx = qLngth - lngth + fLngth;
> +
> +
>   } //   while((tmpValue = strstr(queryString+strIndx, fieldName)) !=
> NULL) {
>
>   return NULL;
>
> --
>
> You received this message because you are subscribed to the Google Groups
> "spctools-discuss" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected]<spctools-discuss%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/spctools-discuss?hl=en.
>
>
>

--

You received this message because you are subscribed to the Google Groups 
"spctools-discuss" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/spctools-discuss?hl=en.


Reply via email to