ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/gclib/seqalign/GXAlign.h
(Generate patch)
# Line 307 | Line 307
307             }
308  
309   #ifdef GDEBUG
310 <        void printAlignment(FILE* f, const char* sa, const char* sb) {
310 >        void printAlignment(FILE* f, const char* sa, int sa_len,
311 >                     const char* sb, int sb_len) {
312                  //print seq A
313             char al[1024]; //display buffer for seq A
314             int ap=0; //index in al[] for current character printed
# Line 332 | Line 333
333           al[++ap]=sa[i];
334           }
335         color_reset(f);
336 <       fprintf(f, &sa[aend]);
336 >       if (aend<sa_len)
337 >         fprintf(f, &sa[aend]);
338         fprintf(f, "\n");
339         //print seq B
340         ap=0;
# Line 364 | Line 366
366           if (mismatch) color_bg(c_blue,f);
367           }
368         color_reset(f);
369 <       fprintf(f, &sb[bend]);
369 >       if (bend<sb_len)
370 >         fprintf(f, &sb[bend]);
371         fprintf(f, "\n");
372         }
373   #endif

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines