<p>Can you add a log message before the for block you removed, so the code becomes:</p>

<pre><code>LM_INFO("current params are <%.*s> (%x)\n", routed_params.len, routed_params.s, *(routed_params.s-1));
for( params=routed_params ; params.s[0]!=';' ; params.s--,params.len++ );
</code></pre>

<p>and then see if the info message prints the proper route params and the previous character in hexa?</p>

<p>As you said, the issue might be in other place, it's good to track it down properly.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/kamailio/kamailio/pull/663#issuecomment-224611080">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe/AF36ZZ5SjrDfnC4zY86HZAoVftdGX6Jwks5qJtSUgaJpZM4Iv45j">mute the thread</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AF36ZeQv8nMQLLEYPiszfKRkhpWGCi8mks5qJtSUgaJpZM4Iv45j.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/kamailio/kamailio/pull/663#issuecomment-224611080"></link>
  <meta itemprop="name" content="View Pull Request"></meta>
</div>
<meta itemprop="description" content="View this Pull Request on GitHub"></meta>
</div>