Commits

marcus  committed 63dd871

Fixed ambiguous parenthesis for image type detection in imageext.save.

  • Participants
  • Parent commits 023a1cf

Comments (0)

Files changed (2)

File docs/ref/scrap.html

   SCRAP_PPM  image/ppm     for PPM encoded image data
   SCRAP_BMP  image/bmp     for BMP encoded image data
 </pre><p>Depending on the platform additional types are automatically registered when data is placed into the clipboard to guarantee a consistent sharing behaviour with other applications. The following listed types can be used as string to be passed to the respective <tt>pygame.scrap</tt> module functions. </p>
-<p>For Windows platforms, the additional types are supported automatically and resolve to its internal definitions: </p>
+<p>For Windows platforms, the additional types are supported automatically and resolve to their internal definitions: </p>
 <pre>  text/plain;charset=utf-8 for UTF-8 encoded text
   audio/wav                for WAV encoded audio
   image/tiff               for TIFF encoded image data
-</pre><p>For <tt>X11</tt> platforms, the additional types are supported automatically and resolve to its internal definitions: </p>
+</pre><p>For <tt>X11</tt> platforms, the additional types are supported automatically and resolve to their internal definitions: </p>
 <pre>  UTF8_STRING               for UTF-8 encoded text
   text/plain;charset=utf-8  for UTF-8 encoded text
   COMPOUND_TEXT             for COMPOUND text

File src/imageext.c

         namelen = strlen (name);
         Py_BEGIN_ALLOW_THREADS;
         if ((namelen > 3) &&
-            ((name[namelen - 1]=='g' || name[namelen - 1]=='G') &&
+            (((name[namelen - 1]=='g' || name[namelen - 1]=='G') &&
                 (name[namelen - 2]=='n' || name[namelen - 2]=='N') &&
                 (name[namelen - 3]=='p' || name[namelen - 2]=='P')) ||
             ((name[namelen - 1]=='g' || name[namelen - 1]=='G') &&
                 (name[namelen - 4]=='j' || name[namelen - 3]=='J')) ||
             ((name[namelen - 1]=='g' || name[namelen - 1]=='G') &&
                 (name[namelen - 2]=='p' || name[namelen - 2]=='P') &&
-                (name[namelen - 3]=='j' || name[namelen - 3]=='J')))
+                (name[namelen - 3]=='j' || name[namelen - 3]=='J'))))
         {
 #ifdef JPEGLIB_H
             result = SaveJPEG (surf, name);