{"action":"created","issue":{"url":"https://api.github.com/repos/JuliaGeo/NetCDF.jl/issues/30","repository_url":"https://api.github.com/repos/JuliaGeo/NetCDF.jl","labels_url":"https://api.github.com/repos/JuliaGeo/NetCDF.jl/issues/30/labels{/name}","comments_url":"https://api.github.com/repos/JuliaGeo/NetCDF.jl/issues/30/comments","events_url":"https://api.github.com/repos/JuliaGeo/NetCDF.jl/issues/30/events","html_url":"https://github.com/JuliaGeo/NetCDF.jl/issues/30","id":175921882,"number":30,"title":"off by one error in nc_get_att?","user":{"login":"kilminster","id":10015817,"avatar_url":"https://avatars.githubusercontent.com/u/10015817?v=3","gravatar_id":"","url":"https://api.github.com/users/kilminster","html_url":"https://github.com/kilminster","followers_url":"https://api.github.com/users/kilminster/followers","following_url":"https://api.github.com/users/kilminster/following{/other_user}","gists_url":"https://api.github.com/users/kilminster/gists{/gist_id}","starred_url":"https://api.github.com/users/kilminster/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kilminster/subscriptions","organizations_url":"https://api.github.com/users/kilminster/orgs","repos_url":"https://api.github.com/users/kilminster/repos","events_url":"https://api.github.com/users/kilminster/events{/privacy}","received_events_url":"https://api.github.com/users/kilminster/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-09-09T03:50:56Z","updated_at":"2016-09-09T04:07:57Z","closed_at":null,"body":"I'm finding the last character of attributes is being cut off, and errors are raised if the attribute is a 0-length string.  I think this is an off by one error, since the following seems to fix it.\r\n\r\nline 155 of netcdf_helpers is currently:\r\n`    valsa=Array(nctype2jltype[attype],attlen)`\r\nchange this to:\r\n`    valsa=Array(nctype2jltype[attype],attlen+1)`\r\n"},"comment":{"url":"https://api.github.com/repos/JuliaGeo/NetCDF.jl/issues/comments/245814248","html_url":"https://github.com/JuliaGeo/NetCDF.jl/issues/30#issuecomment-245814248","issue_url":"https://api.github.com/repos/JuliaGeo/NetCDF.jl/issues/30","id":245814248,"user":{"login":"kilminster","id":10015817,"avatar_url":"https://avatars.githubusercontent.com/u/10015817?v=3","gravatar_id":"","url":"https://api.github.com/users/kilminster","html_url":"https://github.com/kilminster","followers_url":"https://api.github.com/users/kilminster/followers","following_url":"https://api.github.com/users/kilminster/following{/other_user}","gists_url":"https://api.github.com/users/kilminster/gists{/gist_id}","starred_url":"https://api.github.com/users/kilminster/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kilminster/subscriptions","organizations_url":"https://api.github.com/users/kilminster/orgs","repos_url":"https://api.github.com/users/kilminster/repos","events_url":"https://api.github.com/users/kilminster/events{/privacy}","received_events_url":"https://api.github.com/users/kilminster/received_events","type":"User","site_admin":false},"created_at":"2016-09-09T04:07:57Z","updated_at":"2016-09-09T04:07:57Z","body":"The above change is not the right way to fix the problem, as the original issue seems only to affect string valued attributes.  The above change fixes the strings, but messes up numeric valued attributes.  For now, the following change seems to be working:\r\n\r\n`    typ=nctype2jltype[attype]\r\n    if typ==UInt8\r\n        valsa=Array(nctype2jltype[attype],attlen+1)\r\n    else\r\n        valsa=Array(nctype2jltype[attype],attlen)\r\n    end`\r\n\r\nSomeone who knows the code better than I do could probably make a less ugly fix."}}
{"actor":{"display_login":"kilminster"}}