<p>...The problem seems to be within mod_tile.c, the <code>tile_translate</code> function is also computing 2^zoom with 1<<z, which breaks everything... </p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br>Reply to this email directly or <a href="https://github.com/openstreetmap/mod_tile/issues/118#issuecomment-165417280">view it on GitHub</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AD2-7i8sLmYALBYn1SXhSB8FIGxvTetZks5pQok1gaJpZM4G2YSn.gif" width="1" /></p>
<div itemscope itemtype="http://schema.org/EmailMessage">
<div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
  <link itemprop="url" href="https://github.com/openstreetmap/mod_tile/issues/118#issuecomment-165417280"></link>
  <meta itemprop="name" content="View Issue"></meta>
</div>
<meta itemprop="description" content="View this Issue on GitHub"></meta>
</div>