<p>In <a href="https://github.com/geany/geany/pull/621#discussion_r40511290">src/document.c</a>:</p>
<pre style='color:#555'>> {
> ui_set_statusbar(TRUE, "%s", err->message);
> g_error_free(err);
> return FALSE;
> }
>
> - filedata->len = (gsize) st.st_size;
</pre>
<blockquote>
<p>Yeah agreed it looked odd. FTR I just traced it back to some encoding-related stuff, no explanation why not using the size returned by the load function</p>
</blockquote>
<p>Maybe we shouldn't store the length here at all if encoding stores <code>strlen()</code> as part of its NUL checks.</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/geany/geany/pull/621/files#r40511290">view it on GitHub</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/ABDrJy6KLtAHyxufxUVCNnZvrNKw5Ctiks5o2HEogaJpZM4FwLm6.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/geany/geany/pull/621/files#r40511290"></link>
<meta itemprop="name" content="View Pull Request"></meta>
</div>
<meta itemprop="description" content="View this Pull Request on GitHub"></meta>
</div>